예제 #1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            IList <MRegister> ls = new BFinance().GetRegisterById(
                CurrentUserCompanyID,
                Utils.ConvertToIntArray(Utils.GetQueryStringValue("registerIds").Split(','))
                );

            if (ls != null && ls.Count > 0)
            {
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                lbl_amount.Text = UtilsCommons.GetMoneyString(ls.Sum(item => item.PaymentAmount), ProviderToMoney);
            }
            lbl_EAPerson.Text = SiteUserInfo.Name;
            txt_EADate.Text   = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
        }
예제 #2
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            IsInAccount = Utils.GetQueryStringValue("isInAccount") == "" ? false : true;
            //系统配置实体
            MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID) ?? new MComSetting();

            IsEnableKis = comModel.IsEnableKis;

            if (Utils.GetQueryStringValue("isInAccount") == "chakan")
            {
                IsEnableKis = false;
            }

            txt_PDate.Text                 = UtilsCommons.GetDateString(DateTime.Now, ProviderToDate);
            this.SellsSelect1.SellsID      = this.SiteUserInfo.UserId;
            this.SellsSelect1.SellsName    = this.SiteUserInfo.Name;
            this.SellsSelect1.ReadOnly     = IsInAccount;  //财务入账 不能修改出纳
            this.SellsSelect1.IsShowSelect = !IsInAccount; //财务入账 隐藏选用按钮
            this.hideDeptID.Value          = this.SiteUserInfo.DeptId.ToString();

            IList <MRegister> ls = new BFinance().GetRegisterById(
                CurrentUserCompanyID,
                Utils.ConvertToIntArray(Utils.GetQueryStringValue("registerIds").Split(','))
                );

            if (ls != null && ls.Count > 0)
            {
                rpt_list.DataSource = ls;
                rpt_list.DataBind();
                lbl_amount.Text = UtilsCommons.GetMoneyString(ls.Sum(item => item.PaymentAmount).ToString(), ProviderToMoney);
                if (ls[0].Status == EyouSoft.Model.EnumType.FinStructure.FinStatus.账务已支付)
                {
                    txt_PDate.Text              = UtilsCommons.GetDateString(ls[0].PayTime, ProviderToDate);
                    this.SellsSelect1.SellsID   = ls[0].AccountantId;
                    this.SellsSelect1.SellsName = ls[0].Accountant;
                    this.hideDeptID.Value       = ls[0].AccountantDeptId.ToString();
                    txt_PDate.Enabled           = false;
                }
            }
        }