public string GetDetailBtnStr(object ObjGuid, object objStatus)
 {
     string EndGuid = ObjGuid as string;
     string StartGuid = new CawZuoyeEndDB().GetDetail(EndGuid).STARTGUID;
     string EndStatus = objStatus as string;
     if (EndStatus!="2")
     {
         return "<a href=\"#\" onmousemove=\"javascript:this.className='GridButtonOver';\" onmouseout=\"javascript:this.className='GridButtonOut'\" class=\"GridButtonOut\" onclick=\"javascript:ShowDetail('" + StartGuid + "');\">【明细】</a>";
     }
     else
     {
         return "<a href=\"#\" onmousemove=\"javascript:this.className='GridButtonOver';\" onmouseout=\"javascript:this.className='GridButtonOut'\" class=\"GridButtonOut\" onclick=\"javascript:ShowDetail('" + EndGuid + "');\">【明细】</a>";
     }
 }
Ejemplo n.º 2
0
 /// <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 CawZuoyeEndDB().Select(Is_Agent, CompanyGuid, AgentGuid, this.dftEnd.FromText.Trim(), this.dftEnd.ToText.Trim(), Pager1.PageSize, Pager1.CurrentPageIndex, out TotalNum);
     GridView1.DataSource = dv;
     GridView1.DataBind();
     FrameCommon FC = new FrameCommon();
     FC.SetPagerInfo(Pager1, TotalNum, Pager1.PageSize, Pager1.CurrentPageIndex, "");
     FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");
     //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
     CallJsFun("ChangeColor();");
 }
        /// <summary>
        /// 选择数据
        /// </summary>
        protected void refresh()
        {
            string CompanyGuid = this.ddlCompany.SelectedIndex == 0 ? "" : this.ddlCompany.SelectedItem.Value.Trim();
            string FromTime = this.dftApply.FromText.Trim() == "" ? "" : this.dftApply.FromText.Trim() + " 00:00:00";
            string ToTime = this.dftApply.ToText.Trim() == "" ? "" : this.dftApply.ToText.Trim() + " 23:59:59";
            string CargoType = this.ddlCargoType.SelectedItem.Value.Trim();
            string CargoName = this.txtCargoName.Text.Trim();
            string ShipName = this.txtShipName.Text.Trim();
            string TradeType = this.ddlTradeType.SelectedItem.Value.Trim();
            string WorkType = this.ddlWorkType.SelectedItem.Value.Trim();
            string InOROut = this.ddlInOROut.SelectedItem.Value.Trim();

            int TotalNum = 0;
            DataView dv = new CawZuoyeEndDB().SelectPortDynamic(CompanyGuid, FromTime, ToTime, CargoType, CargoName, ShipName, TradeType, WorkType, InOROut, Pager1.PageSize, Pager1.CurrentPageIndex, out TotalNum);
            //dv.RowFilter = " ENDSTATUS<>'2' OR ENDSTATUS is null";
            GridView1.DataSource = dv;
            GridView1.DataBind();
            FrameCommon FC = new FrameCommon();
            FC.SetPagerInfo(Pager1, TotalNum, Pager1.PageSize, Pager1.CurrentPageIndex, "");
            FC.SetPagerInfo(AspNetPager1, TotalNum, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "");
            //调用一个js函数,用于强制执行datagrid的颜色变换。如不用,因updatapanel中数据更新后将无法引起datagridcolor.js的执行
            CallJsFun("ChangeColor();");
        }