?? deallistservice.aspx.cs
字號:
?using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MyCRM.BLL;
using MyCRM.Models;
public partial class service_deallistservice : System.Web.UI.Page
{
int count = 0;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
display();
List<Bas_dict> dict2 = DictManager.GetDict("服務類型");
ddl1.Items.Clear();
ddl1.Items.Add(new ListItem("全部", ""));
foreach (Bas_dict dict in dict2)
{
ListItem li = new ListItem();
li.Value = dict.Dict_item;
li.Text = dict.Dict_item;
ddl1.Items.Add(li);
}
}
}
protected void display()
{
GridView1.DataSource = ServerManager.GetSer("已分配");
GridView1.DataBind();
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int seid = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "edit")
{
Response.Redirect("allot.aspx?seid=" + seid);
}
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
}
protected void sel_Click(object sender, EventArgs e)
{
grid();
}
protected void grid()
{
string names = name.Text.Trim();
string tit = title.Text.Trim();
string ddl = ddl1.Text;
if (begintime.Text == "" && endtime.Text == "")
{
GridView1.DataSource = ServerManager.GetServiceSelect(names, tit, ddl, DateTime.Parse("1900/8/13 20:52:23"), DateTime.Parse("9000/8/13 20:52:23"), "已分配");
GridView1.DataBind();
}
else
{
GridView1.DataSource = ServerManager.GetServiceSelect(names, tit, ddl, DateTime.Parse(begintime.Text), DateTime.Parse(endtime.Text), "已分配");
GridView1.DataBind();
}
if (GridView1.DataSource == null)
{
count = 1;
}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
if (count == 1)
{
display();
}
else
{
grid();
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -