예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HiddenNow.Value    = System.DateTime.Now.ToShortDateString();
        HiddenIsZero.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsZero.ToString();//是否允许价格为零
        string OutNoID = Request.QueryString["OutNoID"];

        companyCD             = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        HiddenPoint.Value     = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;              //小数位
        HiddenMoreUnit.Value  = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit.ToString(); //是否启用多计量单位
        UserTransactor.Value  = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).EmployeeName.ToString();
        txtTransactorID.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).EmployeeID.ToString();
        txtOutDate.Text       = System.DateTime.Now.ToString("yyyy-MM-dd");
        if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsDisplayPrice)
        {
            IsDisplayPrice.Value = "true";
        }
        else
        {
            IsDisplayPrice.Value = "false";
        }
        if (!IsPostBack)
        {
            ddlFromType.Attributes.Add("onchange", "DoChange();");
            txtOutNo.CodingType = ConstUtil.CODING_RULE_Storage_NO;
            txtOutNo.ItemTypeID = ConstUtil.CODING_RULE_StorageOut_NO;

            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("--请选择--", ""));

            if (OutNoID != "" && OutNoID != null)
            {
                txtIndentityID.Value = OutNoID;//给隐藏域赋主键
            }
            else
            {
                this.txtCreator.Text    = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).EmployeeName.ToString();//制单人
                this.txtCreateDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");

                this.txtModifiedUserID.Text = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID.ToString(); //最后更新人
                this.txtModifiedDate.Text   = System.DateTime.Now.ToString("yyyy-MM-dd");                        //新建的时候给最后更新时间日期赋值
            }
            if (OutNoID != "" && OutNoID != null)
            {
                this.div_OutNo_uc.Attributes.Add("style", "display:none;");
                this.div_OutNo_Lable.Attributes.Add("style", "display:block;");
            }
            else
            {
                this.div_OutNo_uc.Attributes.Add("style", "display:block;");
                this.div_OutNo_Lable.Attributes.Add("style", "display:none;");
            }
            StorageModel model = new StorageModel();
            model.CompanyCD  = companyCD;
            model.UsedStatus = "1";
            DataTable dt1 = StorageBus.GetStorageListByRed(model);
            if (dt1.Rows.Count > 0)
            {
                ddlStorageInfo.DataSource     = dt1;
                ddlStorageInfo.DataTextField  = "StorageName";
                ddlStorageInfo.DataValueField = "ID";
                ddlStorageInfo.DataBind();
            }

            //模板列表模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGEOUTRED_LIST;
            //获取请求参数
            string requestParam = Request.QueryString.ToString();
            //通过参数个数来判断是否从菜单过来
            int firstIndex = requestParam.IndexOf("&");
            //从列表过来时
            if (firstIndex > 0)
            {
                //返回按钮可见
                btnBack.Visible = true;
                //获取列表的查询条件
                string searchCondition = requestParam.Substring(firstIndex);
                //去除参数
                searchCondition = searchCondition.Replace("&ModuleID=" + ConstUtil.MODULE_ID_STORAGE_STORAGEOUTRED_LIST, string.Empty);
                //设置检索条件
                hidSearchCondition.Value = searchCondition;
            }
            else
            {
                //返回按钮不可见
                btnBack.Visible = false;
            }
        }
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //启用小数位数,默认2位
        hidSelPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;

        string companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

        if (!IsPostBack)
        {
            DataTable dtReason = CodeReasonTypeBus.GetReasonType(companyCD);
            if (dtReason.Rows.Count > 0)
            {
                ddlReasonType.DataSource     = dtReason;
                ddlReasonType.DataTextField  = "CodeName";
                ddlReasonType.DataValueField = "ID";
                ddlReasonType.DataBind();
            }
            ddlReasonType.Items.Insert(0, new ListItem("-请选择-", ""));

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

            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"];
                    sltFromType.Value = Request.QueryString["FromType"];
                    txtFromBillID.Attributes.Add("title", Request.QueryString["FromBillID"]);
                    hidFromBillID.Value     = Request.QueryString["FromBillID"];
                    txtDeptID.Value         = Request.QueryString["InPutDept"];
                    sltBillStatus.Value     = Request.QueryString["BillStatus"];
                    txtExecutorID.Value     = Request.QueryString["Executor"];
                    txtEnterDateStart.Value = Request.QueryString["EnterDateStart"];
                    txtEnterDateEnd.Value   = Request.QueryString["EnterDateEnd"];
                    DeptName.Value          = Request.QueryString["DeptName"];
                    txtFromBillID.Value     = Request.QueryString["FromBillNo"];
                    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>");
                }
            }
        }
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string InNoID = Request.QueryString["InNoID"];

        companyCD = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;

        //明细单价是否允许为0
        hidZero.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsZero.ToString();

        //是否启用批次
        BatchRuleControl1.CodingType = ConstUtil.CODING_RULE_TYPE_ZERO;
        BatchRuleControl1.ItemTypeID = ConstUtil.CODING_RULE_BATCH_NO;


        ////是否启用单位组
        if (((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsMoreUnit)
        {
            hidMoreUnit.Value = "true";
            tdDanWei.Attributes.Add("style", "display:block;");
            tdDanWei.Attributes.Add("style", "width: 8%");
            tdShuLiang.Attributes.Add("style", "display:block;");
            tdShuLiang.Attributes.Add("style", "width: 8%");
            divSpan.Attributes.Add("style", "display:block;");
            divRedSpan.Attributes.Add("style", "display:none;");
            divJiBendw.Attributes.Add("style", "display:block;");
            divDanWei.Attributes.Add("style", "display:none;");
        }
        else
        {
            hidMoreUnit.Value = "false";
            tdDanWei.Attributes.Add("style", "display:none;");
            tdShuLiang.Attributes.Add("style", "display:none;");
            divSpan.Attributes.Add("style", "display:none;");
            divRedSpan.Attributes.Add("style", "display:block;");
            divJiBendw.Attributes.Add("style", "display:none;");
            divDanWei.Attributes.Add("style", "display:block;");
        }

        //启用小数位数,默认2位
        hidSelPoint.Value = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).SelPoint;

        if (!IsPostBack)
        {
            BindTree();//这个是绑定数据源

            ddlFromType.Attributes.Add("onchange", "DoChange();");

            txtInNo.CodingType = ConstUtil.CODING_RULE_Storage_NO;
            txtInNo.ItemTypeID = ConstUtil.CODING_RULE_StorageIn_NO;
            if (InNoID != "" && InNoID != null)
            {
                txtIndentityID.Value = InNoID;//给隐藏域赋主键
            }
            else
            {
                this.txtCreator.Text    = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).EmployeeName.ToString();//制单人
                this.txtCreateDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");

                this.txtModifiedUserID.Text = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID.ToString(); //最后更新人
                this.txtModifiedDate.Text   = System.DateTime.Now.ToString("yyyy-MM-dd");                        //新建的时候给最后更新时间日期赋值
                UserExecutor.Value          = UserInfo.EmployeeName;
                txtExecutorID.Value         = UserInfo.EmployeeID.ToString();
                txtEnterDate.Text           = DateTime.Now.ToString("yyyy-MM-dd");
            }
            //控制条码扫描
            if (!((UserInfoUtil)SessionUtil.Session["UserInfo"]).IsBarCode)
            {
                btnGetGoods.Visible = false;
            }
            if (InNoID != "" && InNoID != null)
            {
                this.div_InNo_uc.Attributes.Add("style", "display:none;");
                this.div_InNo_Lable.Attributes.Add("style", "display:block;");
            }
            else
            {
                this.div_InNo_uc.Attributes.Add("style", "display:block;");
                this.div_InNo_Lable.Attributes.Add("style", "display:none;");
            }
            DataTable dt = CodeReasonTypeBus.GetReasonType(companyCD);
            if (dt.Rows.Count > 0)
            {
                ddlReasonType.DataSource     = dt;
                ddlReasonType.DataTextField  = "CodeName";
                ddlReasonType.DataValueField = "ID";
                ddlReasonType.DataBind();
            }
            ddlReasonType.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)
            {
                ddlStorageInfo.DataSource     = dt1;
                ddlStorageInfo.DataTextField  = "StorageName";
                ddlStorageInfo.DataValueField = "ID";
                ddlStorageInfo.DataBind();
            }

            //模板列表模块ID
            hidModuleID.Value = ConstUtil.MODULE_ID_STORAGE_STORAGEINOTHER_LIST;
            //获取请求参数
            string requestParam = Request.QueryString.ToString();
            //通过参数个数来判断是否从菜单过来
            int firstIndex = requestParam.IndexOf("&");
            //从列表过来时
            if (firstIndex > 0)
            {
                //返回按钮可见
                btnBack.Visible = true;
                //获取列表的查询条件
                string searchCondition = requestParam.Substring(firstIndex);
                //去除参数
                searchCondition = searchCondition.Replace("&ModuleID=" + ConstUtil.MODULE_ID_STORAGE_STORAGEINOTHER_LIST, string.Empty);
                //设置检索条件
                hidSearchCondition.Value = searchCondition;
            }
            else
            {
                //返回按钮不可见
                btnBack.Visible = false;
            }
        }
    }
    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>");
                }
            }
        }
    }