/// <summary> /// 选择数据 /// </summary> protected void refresh() { int TotalNum = 0; string AgentGuid = ""; string CompanyGuid = Session["ORGID"].ToString(); string Is_Agent = ViewState["IS_AGENT"].ToString(); if (Is_Agent == "1") { AgentGuid = Session["ORGID"].ToString(); CompanyGuid = this.ddlCorp.SelectedIndex == 0 ? "" : this.ddlCorp.SelectedItem.Value.Trim(); } DataView dv = new CawZuoyeStartDB().Select(Is_Agent, CompanyGuid, AgentGuid, dftStart.FromText.Trim(), dftStart.ToText.Trim(), ddlStatus.SelectedItem.Value.Trim(), AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out TotalNum); GridView1.DataSource = dv; GridView1.DataBind(); FrameCommon FC = new FrameCommon(); FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, ""); //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行 CallJsFun("ChangeColor();"); }
private void InitiData(string StartGuid) { Detail_CAW_MANAGE_START DCMS = new CawZuoyeStartDB().GetDetail(StartGuid); this.txtShipName.Text = DCMS.SHIPNAME; this.lblShipGuid.Text = DCMS.SHIPGUID; this.txtShipNation.Text = new CawZuoyeShipDB().GetDetail(DCMS.SHIPGUID).NATIONALITY; }