protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //扩展属性
            GetBillExAttrControl1.TableName = "officedba.SellBack";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];
            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();

            DataTable dt = SellBackBus.GetReasonType();
            if (dt.Rows.Count > 0)
            {
                ddlReasonType.DataSource     = dt;
                ddlReasonType.DataTextField  = "CodeName";
                ddlReasonType.DataValueField = "ID";
                ddlReasonType.DataBind();
            }
            ddlReasonType.Items.Insert(0, new ListItem("请选择", ""));
            btnImport.Attributes["onclick"] = "return fnIsSearch();";
            // 小数位数
            _selPoint = int.Parse(UserInfo.SelPoint);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //新建模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGEOUTRED_ADD;
            GetBillExAttrControl1.TableName = "officedba.StorageOutRed";
            HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//小数位
            if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsDisplayPrice)
            {
                IsDisplayPrice.Value = "true";
            }
            else
            {
                IsDisplayPrice.Value = "false";
            }

            //返回处理

            string requestParam = Request.QueryString.ToString();
            //从列表过来时
            int firstIndex = requestParam.IndexOf("&");
            //返回回来时
            if (firstIndex > 0)
            {
                //获取是否查询的标识
                string flag = Request.QueryString["Flag"];
                //点击查询时,设置查询的条件,并执行查询
                if ("1".Equals(flag))
                {
                    txtOutNo.Value    = Request.QueryString["OutNo"];
                    txtTitle.Value    = Request.QueryString["Title"];
                    sltFromType.Value = Request.QueryString["FromType"];
                    txtFromBillID.Attributes.Add("title", Request.QueryString["FromOutID"]);
                    hidFromBillID.Value   = Request.QueryString["FromOutID"];
                    sltBillStatus.Value   = Request.QueryString["BillStatus"];
                    txtOuterID.Value      = Request.QueryString["Transactor"];
                    txtOutDateStart.Value = Request.QueryString["OutDateStart"];
                    txtOutDateEnd.Value   = Request.QueryString["OutDateEnd"];
                    txtFromBillID.Value   = Request.QueryString["FromOutNo"];
                    UserOuter.Value       = Request.QueryString["UserOuter"];
                    txtBatchNo.Value      = Request.QueryString["BatchNo"];
                    //获取当前页
                    string pageIndex = Request.QueryString["pageIndex"];
                    //获取每页显示记录数
                    string pageCount = Request.QueryString["pageCount"];

                    string EFIndex = Request.QueryString["EFIndex"];
                    string EFDesc  = Request.QueryString["EFDesc"];

                    GetBillExAttrControl1.ExtIndex = EFIndex;
                    GetBillExAttrControl1.ExtValue = EFDesc;
                    GetBillExAttrControl1.SetExtControlValue();
                    //执行查询
                    ClientScript.RegisterStartupScript(this.GetType(), "DoSearch"
                                                       , "<script language=javascript>this.pageCount = parseInt(" + pageCount + ");DoSearch('" + pageIndex + "');</script>");
                }
            }
        }
    }
Exemple #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        if (!IsPostBack)
        {
            BindCom();
            HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//小数位

            GetBillExAttrControl1.TableName = "officedba.Productinfo";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];
            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();

            StorageModel model = new StorageModel();
            model.CompanyCD  = companyCD;
            model.UsedStatus = "1";
            DataTable dt1 = StorageBus.GetStorageListBycondition(model);
            if (dt1.Rows.Count > 0)
            {
                ddlStorage.DataSource     = dt1;
                ddlStorage.DataTextField  = "StorageName";
                ddlStorage.DataValueField = "ID";
                ddlStorage.DataBind();
                ddlStorage.Items.Insert(0, new ListItem("--请选择--", ""));
            }
            //this.txtStartDate.Text = System.DateTime.Now.AddDays(1 - System.DateTime.Now.Day).ToString("yyyy-MM-dd");
            //this.txtEndDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
            this.hidModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGEJOURNAL;



            //点击查询时,设置查询的条件,并执行查询
            if (Request.QueryString["Flag"] != null)
            {
                this.ddlStorage.SelectedValue = Request.QueryString["ddlStorage"].ToString();
                this.txtProductNo.Value       = Request.QueryString["txtProductNo"].ToString();
                //this.txtProductName.Value = Request.QueryString["txtProductName"].ToString();
                this.txtStartDate.Text     = Request.QueryString["StartDate"].ToString();
                this.txtEndDate.Text       = Request.QueryString["EndDate"].ToString();
                this.hiddenProductID.Value = Request.QueryString["ProductID"].ToString();
                //获取当前页
                string pageIndex = Request.QueryString["pageIndex"];
                //获取每页显示记录数
                string pageCount = Request.QueryString["pageCount"];
                //执行查询
                //ClientScript.RegisterStartupScript(this.GetType(), "Fun_Search_StorageInfo"
                //        , "<script language=javascript>this.pageCount = parseInt(" + pageCount + ");Fun_Search_StorageInfo('" + pageIndex + "');</script>");
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//
     if (!IsPostBack)
     {
         GetBillExAttrControl1.TableName = "officedba.PurchaseAskPrice";
         string EFIndex = Request.QueryString["EFIndex"];
         string EFDesc  = Request.QueryString["EFDesc"];
         GetBillExAttrControl1.ExtIndex = EFIndex;
         GetBillExAttrControl1.ExtValue = EFDesc;
         GetBillExAttrControl1.SetExtControlValue();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         LoadDepot();
         GetBillExAttrControl1.TableName = "officedba.StorageReturn";
         string EFIndex = Request.QueryString["EFIndex"];
         string EFDesc  = Request.QueryString["EFDesc"];
         GetBillExAttrControl1.ExtIndex = EFIndex;
         GetBillExAttrControl1.ExtValue = EFDesc;
         GetBillExAttrControl1.SetExtControlValue();
     }
     MoudleID.Value = ConstUtil.MODULE_ID_STORAGE_RETURN_SAVE;
 }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         BindStorageInfo();
         //扩展属性
         GetBillExAttrControl1.TableName = "officedba.StorageTransfer";
         string EFIndex = Request.QueryString["EFIndex"];
         string EFDesc  = Request.QueryString["EFDesc"];
         GetBillExAttrControl1.ExtIndex = EFIndex;
         GetBillExAttrControl1.ExtValue = EFDesc;
         GetBillExAttrControl1.SetExtControlValue();
         hidSelPoint.Value = UserInfo.SelPoint;
     }
     MoudleID.Value      = ConstUtil.MODULE_ID_STORAGE_TRANSFER_SAVE;
     ModuleInOutID.Value = ConstUtil.MODULE_ID_STORAGE_TRANSFER_LIST;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //扩展属性
            GetBillExAttrControl1.TableName = "officedba.SellGathering";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];
            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();

            btnImport.Attributes["onclick"] = "return fnIsSearch();";
            // 小数位数
            _selPoint = int.Parse(UserInfo.SelPoint);
        }
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadDepot();
            //扩展属性
            GetBillExAttrControl1.TableName = "officedba.StorageBorrow";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];
            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();

            hidSelPoint.Value = UserInfo.SelPoint;
        }
        MoudleID.Value = ConstUtil.MODULE_ID_STORAGE_BORROW_SAVE;
    }
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        //设置行为参数
        string orderString = hiddExpOrder.Value.Trim();                                                                               //排序
        string order       = "desc";                                                                                                  //排序:降序
        string orderBy     = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "GatheringNo"; //要排序的字段,如果为空,默认为"ID"

        if (orderString.EndsWith("_a"))
        {
            order = "asc";                                    //排序:升序
        }
        int       pageCount  = int.Parse(hiddExpTotal.Value); //每页显示记录数
        int       pageIndex  = 1;                             //当前页
        int       TotalCount = 0;                             //总记录数
        string    ord        = orderBy + " " + order;         //排序字段
        DataTable dt         = new DataTable();

        SellGatheringModel sellGatheringModel = new SellGatheringModel();

        GetSellGatheringModel(sellGatheringModel);
        string PlanPrice0 = hiddExpPlanPrice0.Value.Trim();      //计划回款金额

        PlanPrice0 = PlanPrice0.Length == 0 ? null : PlanPrice0;
        string EFIndex = Request.QueryString["EFIndex"];
        string EFDesc  = Request.QueryString["EFDesc"];

        GetBillExAttrControl1.ExtIndex = EFIndex;
        GetBillExAttrControl1.ExtValue = EFDesc;
        GetBillExAttrControl1.SetExtControlValue();

        dt = SellGatheringBus.GetSellGathering(sellGatheringModel, PlanPrice0, EFIndex, EFDesc, pageIndex, pageCount, ord, ref TotalCount);

        //导出标题
        string headerTitle = "单据编号|主题|客户|回款状态|源单类型|源单编号|业务员|总金额|期次|计划日期";

        string[] header = headerTitle.Split('|');

        //导出标题所对应的列字段名称
        string columnFiled = "GatheringNo|Title|CustName|stateName|fromTypeName|BillNo|EmployeeName|PlanPrice|GatheringTime|PlanGatherDate";

        //string columnFiled = "CreateDate|strUsedStatus";
        string[] field = columnFiled.Split('|');

        XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "回款计划列表");
    }
Exemple #10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     BindTree();
     if (!IsPostBack)
     {
         BindColor();
         this.hidModuleID.Value          = ConstUtil.Menu_AddProduct;
         GetBillExAttrControl1.TableName = "officedba.ProductInfo";
         string EFIndex = Request.QueryString["EFIndex"];
         string EFDesc  = Request.QueryString["EFDesc"];
         GetBillExAttrControl1.ExtIndex = EFIndex;
         GetBillExAttrControl1.ExtValue = EFDesc;
         GetBillExAttrControl1.SetExtControlValue();
         string requestParam = Request.QueryString.ToString();
         //从列表过来时
         int firstIndex = requestParam.IndexOf("&");
         //返回回来时
         if (firstIndex > 0)
         {
             //获取是否查询的标识
             string flag = Request.QueryString["Flag"];
             //点击查询时,设置查询的条件,并执行查询
             if ("1".Equals(flag))
             {
                 this.txt_TypeID.Value        = Request.QueryString["txt_TypeID"];
                 txt_ProdNo.Value             = Request.QueryString["ProdNo"];
                 txt_PYShort.Value            = Request.QueryString["PYShort"];
                 txt_ProductName.Text         = Request.QueryString["ProductName"];
                 txt_BarCode.Value            = Request.QueryString["BarCode"];
                 this.selCorlor.SelectedValue = Request.QueryString["Color"];
                 this.txt_Specification.Value = Request.QueryString["Specification"];
                 this.UsedStatus.Value        = Request.QueryString["UsedStatus"];
                 this.CheckStatus.Value       = Request.QueryString["CheckStatus"];
                 //获取当前页
                 string pageIndex = Request.QueryString["PageIndex"];
                 //获取每页显示记录数
                 string pageCount = Request.QueryString["PageCount"];
                 //执行查询
                 ClientScript.RegisterStartupScript(this.GetType(), "DoSearch"
                                                    , "<script language=javascript>this.pageCount = parseInt(" + pageCount + ");Fun_Search_ProductInfo('" + pageIndex + "');</script>");
             }
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         TakeType.TypeFlag       = ConstUtil.SELL_TYPE_SELL;     //交货方式
         TakeType.TypeCode       = ConstUtil.SELL_TYPE_TAKETYPE; //交
         TakeType.IsInsertSelect = true;
         //扩展属性
         GetBillExAttrControl1.TableName = "officedba.SellSend";
         string EFIndex = Request.QueryString["EFIndex"];
         string EFDesc  = Request.QueryString["EFDesc"];
         GetBillExAttrControl1.ExtIndex = EFIndex;
         GetBillExAttrControl1.ExtValue = EFDesc;
         GetBillExAttrControl1.SetExtControlValue();
         btnImport.Attributes["onclick"] = "return fnIsSearch();";
         // 小数位数
         _selPoint = int.Parse(UserInfo.SelPoint);
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        UserInfo = SessionUtil.Session["UserInfo"] as UserInfoUtil;
        // 小数位数
        _selPoint = int.Parse(UserInfo.SelPoint);

        if (!Page.IsPostBack)
        {
            //新建修改采购合同模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_PurchaseReject_Add;
            BinddrpTypeID();
            GetBillExAttrControl1.TableName = "officedba.PurchaseReject";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];
            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindCom();
            BindTree();
            HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//小数位
            //扩展属性
            GetBillExAttrControl1.TableName = "officedba.ProductInfo";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];

            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();
            //获取仓库列表
            StorageModel model = new StorageModel();
            model.CompanyCD  = UserInfo.CompanyCD;
            model.UsedStatus = "1";
            DataTable dt1 = StorageBus.GetStorageListBycondition2(model);
            if (dt1.Rows.Count > 0)
            {
                ddlStorage.DataSource     = dt1;
                ddlStorage.DataTextField  = "StorageName";
                ddlStorage.DataValueField = "ID";
                ddlStorage.DataBind();
                ddlStorage.Items.Insert(0, new ListItem("--请选择--", ""));
            }
            //获取材质列表
            string    typeflag = "5";
            string    typecode = "5";
            DataTable dt2      = XBase.Business.Office.SystemManager.CodePublicTypeBus.GetCodePublicByCode(typeflag, typecode);
            if (dt2.Rows.Count > 0)
            {
                ddlMaterial.DataSource     = dt2;
                ddlMaterial.DataTextField  = "TypeName";
                ddlMaterial.DataValueField = "ID";
                ddlMaterial.DataBind();
                ddlMaterial.Items.Insert(0, new ListItem("--请选择--", ""));
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//
        if (!IsPostBack)
        {
            GetBillExAttrControl1.TableName = "officedba.PurchaseOrder";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];
            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();


            #region 采购类别
            ddlTypeID.TypeCode       = "5";
            ddlTypeID.TypeFlag       = "7";
            ddlTypeID.IsInsertSelect = true;
            #endregion
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string CompanyCD = "";

        CompanyCD         = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//
        if (!IsPostBack)
        {
            GetBillExAttrControl1.TableName = "officedba.PurchaseContract";
            string EFIndex = Request.QueryString["EFIndex"];
            string EFDesc  = Request.QueryString["EFDesc"];
            GetBillExAttrControl1.ExtIndex = EFIndex;
            GetBillExAttrControl1.ExtValue = EFDesc;
            GetBillExAttrControl1.SetExtControlValue();

            //新建修改采购合同模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_PurchaseContract_Add;
            BindDrpTypeID();
        }
    }
Exemple #16
0
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        //设置行为参数
        string orderString = hiddExpOrder.Value.Trim();                                                                            //排序
        string order       = "desc";                                                                                               //排序:降序
        string orderBy     = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "SttlDate"; //要排序的字段,如果为空,默认为"ID"

        if (orderString.EndsWith("_a"))
        {
            order = "asc";                                    //排序:升序
        }
        int       pageCount  = int.Parse(hiddExpTotal.Value); //每页显示记录数
        int       pageIndex  = 1;                             //当前页
        int       TotalCount = 0;                             //总记录数
        string    ord        = orderBy + " " + order;         //排序字段
        DataTable dt         = new DataTable();

        string strorderNo    = hiddExpOrderNo.Value.Trim();
        string strTitle      = hiddExpTitle.Value.Trim();
        string strCustID     = hiddExpCustID.Value.Trim();
        string strSeller     = hiddExpSeller.Value.Trim();
        string strBillStatus = hiddExpBillStatus.Value.Trim();
        string strSttlDate1  = hiddExpOfferDate1.Value.Trim();
        string strSttlDate   = hiddExpOfferDate.Value.Trim();
        string strFlowStatus = hiddExpFlowStatus.Value.Trim();
        string strFromBillID = hiddExpFromBillID.Value.Trim();


        string   orderNo    = strorderNo.Length == 0 ? null : strorderNo;
        string   Title      = strTitle.Length == 0 ? null : strTitle;
        int?     CustID     = strCustID.Length == 0 ? null : (int?)Convert.ToInt32(strCustID);
        int?     Seller     = strSeller.Length == 0 ? null : (int?)Convert.ToInt32(strSeller);
        string   BillStatus = strBillStatus.Length == 0 ? null : strBillStatus;
        DateTime?date       = strSttlDate.Length == 0 ? null : (DateTime?)Convert.ToDateTime(strSttlDate);
        DateTime?date1      = strSttlDate1.Length == 0 ? null : (DateTime?)Convert.ToDateTime(strSttlDate1);
        int?     FlowStatus = strFlowStatus.Length == 0 ? null : (int?)Convert.ToInt32(strFlowStatus);
        int?     FromBillID = strFromBillID.Length == 0 ? null : (int?)Convert.ToInt32(strFromBillID);
        //扩展属性
        string EFIndex = Request.QueryString["EFIndex"];
        string EFDesc  = Request.QueryString["EFDesc"];

        GetBillExAttrControl1.ExtIndex = EFIndex;
        GetBillExAttrControl1.ExtValue = EFDesc;
        GetBillExAttrControl1.SetExtControlValue();

        SellChannelSttlModel model = new SellChannelSttlModel();

        model.SttlNo = orderNo;
        model.Title  = Title;
        model.CustID = CustID;
        model.Seller = Seller;

        model.BillStatus = BillStatus;
        model.SttlDate   = date;
        model.FromBillID = FromBillID;
        dt = SellChannelSttlBus.GetOrderList(model, date1, FlowStatus, EFIndex, EFDesc, pageIndex, pageCount, ord, ref TotalCount);

        //导出标题
        string headerTitle = "结算单编号|结算单主题|销售发货单|客户|业务员|结算日期|结算金额|单据状态|审批状态";

        //string headerTitle = "建档日期|启用状态";
        string[] header = headerTitle.Split('|');

        //导出标题所对应的列字段名称
        string columnFiled = "SttlNo|Title|OrderNo|CustName|SellerName|SttlDate|SttlTotal|BillStatusText|FlowInstanceText";

        //string columnFiled = "CreateDate|strUsedStatus";
        string[] field = columnFiled.Split('|');

        XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "委托代销单列表");
    }
Exemple #17
0
    protected void imgOutput_Click(object sender, ImageClickEventArgs e)
    {
        StorageBorrow borrow = new StorageBorrow();

        borrow.BorrowNo   = string.IsNullOrEmpty(tboxBorrowNo.Value.Trim())?string.Empty:("%" + tboxBorrowNo.Value.Trim() + "%");
        borrow.Title      = string.IsNullOrEmpty(tboxTitle.Value.Trim()) ? string.Empty : ("%" + tboxTitle.Value.Trim() + "%");
        borrow.Borrower   = Convert.ToInt32(string.IsNullOrEmpty(txtBorrower.Value.Trim())?"-1":txtBorrower.Value.Trim());
        borrow.DeptID     = Convert.ToInt32(string.IsNullOrEmpty(txtBorrowDeptID.Value.Trim())?"-1":txtBorrowDeptID.Value.Trim());
        borrow.OutDeptID  = Convert.ToInt32(string.IsNullOrEmpty(txtOutDept.Value.Trim())?"-1":txtOutDept.Value.Trim());
        borrow.StorageID  = Convert.ToInt32(string.IsNullOrEmpty(ddlDepot.SelectedItem.Value)?"-1":ddlDepot.SelectedItem.Value);
        borrow.Transactor = Convert.ToInt32(string.IsNullOrEmpty(txtTransactor.Value.Trim())?"-1":txtTransactor.Value.Trim());
        borrow.BillStatus = string.IsNullOrEmpty(ddlBillStatus.SelectedItem.Value)?string.Empty:ddlBillStatus.SelectedItem.Value;
        borrow.CompanyCD  = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        DateTime start        = Convert.ToDateTime(string.IsNullOrEmpty(tboxBorrowStartTime.Text.Trim()) ? DateTime.MinValue.ToString() : tboxBorrowStartTime.Text.Trim());
        DateTime end          = Convert.ToDateTime(string.IsNullOrEmpty(tboxBorrowEndTime.Text.Trim()) ? DateTime.MinValue.ToString() : tboxBorrowEndTime.Text.Trim());
        int      SubmitStatus = Convert.ToInt32(string.IsNullOrEmpty(ddlSubmitStatus.SelectedItem.Value)?"-1":ddlSubmitStatus.SelectedItem.Value);
        string   orderString  = (string.IsNullOrEmpty(txtOrderBy.Value.Trim()) ? string.Empty : txtOrderBy.Value.Trim());       //排序
        string   order        = "DESC";                                                                                         //排序:升序
        string   orderBy      = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "ID"; //要排序的字段,如果为空,默认为"ID"

        if (orderString.EndsWith("_a"))
        {
            order = "ASC";//排序:降序
        }
        //扩展属性
        string EFIndex = Request.QueryString["EFIndex"];
        string EFDesc  = Request.QueryString["EFDesc"];

        GetBillExAttrControl1.ExtIndex = EFIndex;
        GetBillExAttrControl1.ExtValue = EFDesc;
        GetBillExAttrControl1.SetExtControlValue();
        orderBy = orderBy + " " + order;

        DataTable dt = XBase.Business.Office.StorageManager.StorageBorrowBus.GetStorageList(EFIndex, EFDesc, borrow, orderBy, start, end, SubmitStatus);

        foreach (DataRow row in dt.Rows)
        {
            if (row["FlowStatus"] == null || row["FlowStatus"].ToString() == "")
            {
                row["FlowStatus"] = "";
            }
            else if (row["FlowStatus"].ToString() == "1")
            {
                row["FlowStatus"] = "待审批";
            }
            else if (row["FlowStatus"].ToString() == "2")
            {
                row["FlowStatus"] = "审批中";
            }
            else if (row["FlowStatus"].ToString() == "3")
            {
                row["FlowStatus"] = "审批通过";
            }
            else if (row["FlowStatus"].ToString() == "4")
            {
                row["FlowStatus"] = "审批不通过";
            }
            else if (row["FlowStatus"].ToString() == "5")
            {
                row["FlowStatus"] = "撤销审批";
            }
        }

        OutputToExecl.ExportToTableFormat(this, dt,
                                          new string[] { "借货单编号", "借货单主题", "借货部门", "借货人", "被借部门", "被借仓库", "借货数量", "借货金额", "出库人", "出库时间", "单据状态", "审批状态" },
                                          new string[] { "BorrowNo", "Title", "DeptID", "Borrower", "OutDeptID", "StorageID", "CountTotal", "TotalPrice", "Transactor", "OutDate", "BillStatus", "FlowStatus" },
                                          "借货单列表");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            companyCD         = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
            HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//小数位
            DataTable dt = CodeReasonTypeBus.GetReasonType(companyCD);
            if (dt.Rows.Count > 0)
            {
                ddlReason.DataSource     = dt;
                ddlReason.DataTextField  = "CodeName";
                ddlReason.DataValueField = "ID";
                ddlReason.DataBind();
            }
            ddlReason.Items.Insert(0, new ListItem("--请选择--", ""));

            //新建模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGEOUTOTHER_ADD;
            GetBillExAttrControl1.TableName = "officedba.StorageOutOther";
            if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsDisplayPrice)
            {
                IsDisplayPrice.Value = "true";
            }
            else
            {
                IsDisplayPrice.Value = "false";
            }

            //返回处理

            string requestParam = Request.QueryString.ToString();
            //从列表过来时
            int firstIndex = requestParam.IndexOf("&");
            //返回回来时
            if (firstIndex > 0)
            {
                //获取是否查询的标识
                string flag = Request.QueryString["Flag"];
                //点击查询时,设置查询的条件,并执行查询
                if ("1".Equals(flag))
                {
                    txtOutNo.Value          = Request.QueryString["OutNo"];
                    txtTitle.Value          = Request.QueryString["Title"];
                    sltFromType.Value       = Request.QueryString["FromType"];
                    ddlReason.SelectedValue = Request.QueryString["ReasonType"];
                    sltBillStatus.Value     = Request.QueryString["BillStatus"];
                    txtOuterID.Value        = Request.QueryString["Transactor"];
                    txtOutDateStart.Value   = Request.QueryString["OutDateStart"];
                    txtOutDateEnd.Value     = Request.QueryString["OutDateEnd"];
                    UserOuter.Value         = Request.QueryString["UserOuter"];
                    txtBatchNo.Value        = Request.QueryString["BatchNo"];

                    HiddenProjectID.Value = Request.QueryString["ProjectID"];
                    SelectProject.Value   = Request.QueryString["ProjectName"];
                    //获取当前页
                    string pageIndex = Request.QueryString["pageIndex"];
                    //获取每页显示记录数
                    string pageCount = Request.QueryString["pageCount"];

                    string EFIndex = Request.QueryString["EFIndex"];
                    string EFDesc  = Request.QueryString["EFDesc"];

                    GetBillExAttrControl1.ExtIndex = EFIndex;
                    GetBillExAttrControl1.ExtValue = EFDesc;
                    GetBillExAttrControl1.SetExtControlValue();
                    //执行查询
                    ClientScript.RegisterStartupScript(this.GetType(), "DoSearch"
                                                       , "<script language=javascript>this.pageCount = parseInt(" + pageCount + ");DoSearch('" + pageIndex + "');</script>");
                }
            }
        }
    }
    protected void btnImport_Click(object sender, ImageClickEventArgs e)
    {
        //设置行为参数
        string orderString = hiddExpOrder.Value.Trim();                                                                             //排序
        string order       = "desc";                                                                                                //排序:降序
        string orderBy     = (!string.IsNullOrEmpty(orderString)) ? orderString.Substring(0, orderString.Length - 2) : "OrderDate"; //要排序的字段,如果为空,默认为"ID"

        if (orderString.EndsWith("_a"))
        {
            order = "asc";                                    //排序:升序
        }
        int       pageCount  = int.Parse(hiddExpTotal.Value); //每页显示记录数
        int       pageIndex  = 1;                             //当前页
        int       TotalCount = 0;                             //总记录数
        string    ord        = orderBy + " " + order;         //排序字段
        DataTable dt         = new DataTable();

        string strorderNo     = hiddExpOrderNo.Value.Trim();
        string strTitle       = hiddExpTitle.Value.Trim();
        string strTotalPrice  = hiddExpTotalPrice.Value.Trim();
        string strTotalPrice1 = hiddExpTotalPrice1.Value.Trim();
        string strFromType    = hiddExpFromType.Value.Trim();
        string strBillStatus  = hiddExpBillStatus.Value.Trim();
        string strCustID      = hiddExpCustID.Value.Trim();
        string strSeller      = hiddExpSeller.Value.Trim();
        string strisOpenbill  = hiddExpIsOpenbill.Value.Trim();
        string strFlowStatus  = hiddExpFlowStatus.Value.Trim();
        string strFromBillID  = hiddExpFromBillID.Value.Trim();
        string strSendPro     = hiddExpSendPro.Value.Trim();
        string strProjectID   = hiddProjectID.Value.Trim();

        string  orderNo     = strorderNo.Length == 0 ? null : strorderNo;
        string  Title       = strTitle.Length == 0 ? null : strTitle;
        decimal?TotalPrice  = strTotalPrice.Length == 0 ? null : (decimal?)Convert.ToDecimal(strTotalPrice);
        decimal?TotalPrice1 = strTotalPrice1.Length == 0 ? null : (decimal?)Convert.ToDecimal(strTotalPrice1);
        string  FromType    = strFromType.Length == 0 ? null : strFromType;
        string  BillStatus  = strBillStatus.Length == 0 ? null : strBillStatus;
        int?    CustID      = strCustID.Length == 0 ? null : (int?)Convert.ToInt32(strCustID);
        int?    Seller      = strSeller.Length == 0 ? null : (int?)Convert.ToInt32(strSeller);
        string  isOpenbill  = strisOpenbill.Length == 0 ? null : strisOpenbill;
        int?    FlowStatus  = strFlowStatus.Length == 0 ? null : (int?)Convert.ToInt32(strFlowStatus);
        int?    FromBillID  = strFromBillID.Length == 0 ? null : (int?)Convert.ToInt32(strFromBillID);
        string  SendPro     = strSendPro.Length == 0 ? null : strSendPro;
        int?    ProjectID   = strProjectID.Length == 0 ? null : (int?)Convert.ToInt32(strProjectID);
        //扩展属性
        string EFIndex = Request.QueryString["EFIndex"];
        string EFDesc  = Request.QueryString["EFDesc"];

        GetBillExAttrControl1.ExtIndex = EFIndex;
        GetBillExAttrControl1.ExtValue = EFDesc;
        GetBillExAttrControl1.SetExtControlValue();

        SellOrderModel model = new SellOrderModel();

        model.OrderNo    = orderNo;
        model.Title      = Title;
        model.TotalPrice = TotalPrice;
        model.FromType   = FromType;
        model.FromBillID = FromBillID;
        model.BillStatus = BillStatus;
        model.CustID     = CustID;
        model.Seller     = Seller;
        model.isOpenbill = isOpenbill;
        model.ProjectID  = ProjectID;

        dt = SellOrderBus.GetOrderList(model, TotalPrice1, SendPro, FlowStatus, EFIndex, EFIndex, pageIndex, pageCount, ord, ref TotalCount);
        //导出标题
        string headerTitle = "订单编号|订单主题|客户|源单类型|源单编号|订单日期|总金额|是否已建单|发货情况|回款金额|单据状态|审批状态";

        //string headerTitle = "建档日期|启用状态";
        string[] header = headerTitle.Split('|');

        //导出标题所对应的列字段名称
        string columnFiled = "OrderNo|Title|CustName|FromTypeText|FromBillNo|OrderDate|RealTotal|isOpenbillText|isSendText|YAccounts|BillStatusText|FlowInstanceText";

        //string columnFiled = "CreateDate|strUsedStatus";
        string[] field = columnFiled.Split('|');

        XBase.Common.OutputToExecl.ExportToTable(this.Page, dt, header, field, "销售订单列表");
    }
Exemple #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        companyCD         = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//小数位
        if (!IsPostBack)
        {
            DataTable dt = CodeReasonTypeBus.GetReasonTypeByFlag(companyCD, "5");
            if (dt.Rows.Count > 0)
            {
                ddlReason.DataSource     = dt;
                ddlReason.DataTextField  = "CodeName";
                ddlReason.DataValueField = "ID";
                ddlReason.DataBind();
                ddlReason.Items.Insert(0, new ListItem("--请选择--", ""));
            }
            StorageModel model = new StorageModel();
            model.CompanyCD  = companyCD;
            model.UsedStatus = "1";
            DataTable dt1 = StorageBus.GetStorageListBycondition(model);
            if (dt1.Rows.Count > 0)
            {
                ddlStorage.DataSource     = dt1;
                ddlStorage.DataTextField  = "StorageName";
                ddlStorage.DataValueField = "ID";
                ddlStorage.DataBind();
                ddlStorage.Items.Insert(0, new ListItem("--请选择--", ""));
            }

            //新建模块ID
            hidModuleID.Value  = ConstUtil.MODULE_ID_STORAGE_STORAGELOSS_ADD;
            ListModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGELOSS_LIST;
            GetBillExAttrControl1.TableName = "officedba.StorageLoss";

            //返回处理

            string requestParam = Request.QueryString.ToString();
            //从列表过来时
            int firstIndex = requestParam.IndexOf("&");
            //返回回来时
            if (firstIndex > 0)
            {
                //获取是否查询的标识
                string flag = Request.QueryString["Flag"];
                //点击查询时,设置查询的条件,并执行查询
                if ("1".Equals(flag))
                {
                    txtLossNo.Value          = Request.QueryString["LossNo"];
                    txtTitle.Value           = Request.QueryString["Title"];
                    txtDeptID.Value          = Request.QueryString["Dept"];
                    ddlStorage.SelectedValue = Request.QueryString["StorageID"];
                    txtExecutorID.Value      = Request.QueryString["Executor"];
                    sltFlowStatus.Value      = Request.QueryString["FlowStatus"];
                    ddlReason.SelectedValue  = Request.QueryString["ReasonType"];
                    sltBillStatus.Value      = Request.QueryString["BillStatus"];
                    txtLossDateStart.Value   = Request.QueryString["LossDateStart"];
                    txtLossDateEnd.Value     = Request.QueryString["LossDateEnd"];

                    txtTotalPriceStart.Value = Request.QueryString["TotalPriceStart"];
                    txtTotalPriceEnd.Value   = Request.QueryString["TotalPriceEnd"];
                    DeptName.Value           = Request.QueryString["DeptName"];
                    UserExecutor.Value       = Request.QueryString["UserExecutor"];
                    txtBatchNo.Value         = Request.QueryString["BatchNo"];

                    //获取当前页
                    string pageIndex = Request.QueryString["pageIndex"];
                    //获取每页显示记录数
                    string pageCount = Request.QueryString["pageCount"];

                    string EFIndex = Request.QueryString["EFIndex"];
                    string EFDesc  = Request.QueryString["EFDesc"];

                    GetBillExAttrControl1.ExtIndex = EFIndex;
                    GetBillExAttrControl1.ExtValue = EFDesc;
                    GetBillExAttrControl1.SetExtControlValue();
                    //执行查询
                    ClientScript.RegisterStartupScript(this.GetType(), "DoSearch"
                                                       , "<script language=javascript>this.pageCount = parseInt(" + pageCount + ");DoSearch('" + pageIndex + "');</script>");
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //启用小数位数,默认2位
        hidSelPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;

        companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        if (!IsPostBack)
        {
            StorageModel model = new StorageModel();
            model.CompanyCD  = companyCD;
            model.UsedStatus = "1";
            DataTable dt = StorageBus.GetStorageListBycondition(model);
            if (dt.Rows.Count > 0)
            {
                ddlStorageID.DataSource     = dt;
                ddlStorageID.DataTextField  = "StorageName";
                ddlStorageID.DataValueField = "ID";
                ddlStorageID.DataBind();
            }
            ddlStorageID.Items.Insert(0, new ListItem("--请选择--", ""));


            //新建模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGEINPROCESS_ADD;
            GetBillExAttrControl1.TableName = "officedba.StorageInProcess";
            //返回处理

            string requestParam = Request.QueryString.ToString();
            //从列表过来时
            int firstIndex = requestParam.IndexOf("&");
            //返回回来时
            if (firstIndex > 0)
            {
                //获取是否查询的标识
                string flag = Request.QueryString["Flag"];
                //点击查询时,设置查询的条件,并执行查询
                if ("1".Equals(flag))
                {
                    txtInNo.Value           = Request.QueryString["InNO"];
                    txtTitle.Value          = Request.QueryString["Title"];
                    txtFromBillID.Value     = Request.QueryString["FromBillNo"];
                    txtDeptProcessID.Value  = Request.QueryString["ProcessDept"];
                    UserProcessor.Value     = Request.QueryString["Processor"];
                    txtDeptID.Value         = Request.QueryString["InPutDept"];
                    sltBillStatus.Value     = Request.QueryString["sltBillStatus"];
                    UserExecutor.Value      = Request.QueryString["Executor"];
                    txtEnterDateStart.Value = Request.QueryString["EnterDateStart"];
                    txtEnterDateEnd.Value   = Request.QueryString["EnterDateEnd"];

                    ddlStorageID.SelectedValue = Request.QueryString["StorageID"];
                    DeptProcessName.Value      = Request.QueryString["DeptProcessName"];
                    UserProcessor.Value        = Request.QueryString["UserProcessor"];
                    DeptName.Value             = Request.QueryString["DeptName"];
                    UserExecutor.Value         = Request.QueryString["UserExecutor"];

                    //txtInNo.Attributes.Add("title", Request.QueryString["InNO"]);

                    //获取当前页
                    string pageIndex = Request.QueryString["pageIndex"];
                    //获取每页显示记录数
                    string pageCount = Request.QueryString["pageCount"];

                    string EFIndex = Request.QueryString["EFIndex"];
                    string EFDesc  = Request.QueryString["EFDesc"];
                    GetBillExAttrControl1.ExtIndex = EFIndex;
                    GetBillExAttrControl1.ExtValue = EFDesc;
                    GetBillExAttrControl1.SetExtControlValue();

                    //执行查询
                    ClientScript.RegisterStartupScript(this.GetType(), "DoSearch"
                                                       , "<script language=javascript>this.pageCount = parseInt(" + pageCount + ");DoSearch('" + pageIndex + "');</script>");
                }
            }
        }
    }