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>");
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //新建模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGEOUTSELL_ADD;
            HiddenPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;//小数位
            GetBillExAttrControl1.TableName = "officedba.StorageOutSell";
            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"];
                //点击查询时,设置查询的条件,并执行查询
                //Hidden1.Value = flag;
                if ("1".Equals(flag))
                {
                    txtOutNo.Value        = Request.QueryString["OutNo"];
                    txtTitle.Value        = Request.QueryString["Title"];
                    txtSellSendNo.Value   = Request.QueryString["SendNo"];
                    txtDeptID.Value       = Request.QueryString["InOutDept"];
                    sltBillStatus.Value   = Request.QueryString["BillStatus"];
                    txtOuterID.Value      = Request.QueryString["Transactor"];
                    txtOutDateStart.Value = Request.QueryString["OutDateStart"];
                    txtOutDateEnd.Value   = Request.QueryString["OutDateEnd"];
                    DeptName.Value        = Request.QueryString["DeptName"];
                    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>");
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        if (!IsPostBack)
        {
            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("--请选择--", ""));
            }
            HidStartDate.Value     = System.DateTime.Now.AddDays(1 - System.DateTime.Now.Day).ToString("yyyy-MM-dd");
            HidEndDate.Value       = 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.txtProviderName.Text = 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();
                this.txtProviderID.Value         = Request.QueryString["ProviderID"].ToString();
                this.txtProviderName.Text        = Request.QueryString["ProviderName"].ToString();
                this.UserCreator.Text            = Request.QueryString["CreatorName"].ToString();
                this.txtCreatorID.Value          = Request.QueryString["CreatorID"].ToString();
                this.ddlSourceType.SelectedValue = Request.QueryString["SourceType"].ToString();
                this.txtSourceNo.Text            = Request.QueryString["SourceNo"].ToString();
                if (Request.QueryString["ckbIsM"].ToString() == "1")
                {
                    this.ckbIsM.Checked = true;
                }
                //获取当前页
                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>");
            }
        }
        this.txtStartDate.Text = HidStartDate.Value;
        this.txtEndDate.Text   = HidEndDate.Value;
    }
Example #4
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, "委托代销单列表");
    }
Example #5
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 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, "销售订单列表");
    }
    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>");
                }
            }
        }
    }