Exemple #1
0
        public override void AfterBindData(EventArgs e)
        {
            //多选组织
            ComboFieldEditor headComboEidtor = this.View.GetControl <ComboFieldEditor>("FMulSelOrgList_Filter");
            List <EnumItem>  comboOptions    = new List <EnumItem>();
            //获取有查看权限的组织
            List <long> orgIdList = this.GetPremissionOrg("PAWK_PurPayDetailReport");

            foreach (long orgId in orgIdList)
            {
                comboOptions.Add(new EnumItem()
                {
                    EnumId = orgId.ToString(), Value = orgId.ToString(), Caption = new LocaleValue(this.GetOrgName(orgId))
                });
            }
            headComboEidtor.SetComboItems(comboOptions);
            //设置默认组织:高山,阳普生
            this.View.Model.SetValue("FMulSelOrgList_Filter", "1,100246");
            //设置起始日期:默认上个月1号
            DateTime beginDate = new DateTime(DateTime.Today.AddMonths(-1).Year, DateTime.Today.AddMonths(-1).Month, 1);

            this.View.Model.SetValue("FBeginDate_Filter", beginDate);
            //获取上个月有多少天
            int monthDay = DateTime.DaysInMonth(DateTime.Today.AddMonths(-1).Year, DateTime.Today.AddMonths(-1).Month);
            //设置结束日期:默认上个月最后一天
            DateTime endDate = new DateTime(DateTime.Today.AddMonths(-1).Year, DateTime.Today.AddMonths(-1).Month, monthDay);

            this.View.Model.SetValue("FEndDate_Filter", endDate);
        }
Exemple #2
0
        private void InitSalOrgId()
        {
            if (this.View.ParentFormView != null)
            {
                this.lstSalOrg = this.GetPermissionOrg(this.View.ParentFormView.BillBusinessInfo.GetForm().Id);
            }
            List <EnumItem>  organization = this.GetOrganization(this.View.Context);
            ComboFieldEditor fieldEditor  = this.View.GetFieldEditor <ComboFieldEditor>("FSaleOrgList", 0);

            fieldEditor.SetComboItems(organization);
            object value = this.Model.GetValue("FSaleOrgList");

            if (value.IsNullOrEmpty() && base.Context.CurrentOrganizationInfo.FunctionIds.Contains(101L))
            {
                this.Model.SetValue("FSaleOrgList", base.Context.CurrentOrganizationInfo.ID);
                this.selOrgId = base.Context.CurrentOrganizationInfo.ID.ToString();
            }
            this.View.Model.GetValue("FMoneyType");
            object paramter = SystemParameterServiceHelper.GetParamter(base.Context, -1L, -1L, "TM_SystemParameter", "ENABLEDTAXMIX", 0L);

            if (paramter == null)
            {
                return;
            }
            Convert.ToBoolean(paramter);
        }
Exemple #3
0
        public override void CreateNewData(BizDataEventArgs e)
        {
            base.CreateNewData(e);

            ComboFieldEditor comboEidtor  = this.View.GetControl <ComboFieldEditor>("F_HS_SelectPrinter");
            List <EnumItem>  comboOptions = new List <EnumItem>();
            List <string>    printers     = PrintUtil.GetPrinterList();

            comboOptions.Add(new EnumItem()
            {
                EnumId = "", Value = "", Caption = new LocaleValue("")
            });                                                          // 空选项

            for (int i = 0; i < printers.Count; i++)
            {
                string ProjectName = printers[i];
                comboOptions.Add(
                    new EnumItem()
                {
                    EnumId = "" + i + 1, Value = ProjectName, Caption = new LocaleValue(ProjectName)
                });
            }

            comboEidtor.SetComboItems(comboOptions);
        }
        private void SetStockComList()
        {
            ComboFieldEditor     headComboEidtor = this.View.GetControl <ComboFieldEditor>("F_PAEZ_outStock");
            List <EnumItem>      comboOptions    = new List <EnumItem>();
            GetSubStockNameUtils subStock        = new GetSubStockNameUtils();
            int i = 0;
            List <DynamicStockObject> fldKeyList = subStock.getStockID(base.Context);

            foreach (DynamicStockObject fldKey in fldKeyList)
            {
                comboOptions.Add(new EnumItem()
                {
                    Caption = new LocaleValue(fldKey.StockName, this.View.Context.UserLocale.LCID), EnumId = i.ToString(), Seq = i, Value = fldKey.ToString()
                });
                i = i + 1;
            }

            headComboEidtor.SetComboItems(comboOptions);
        }
Exemple #5
0
        public override void AfterBindData(EventArgs e)
        {
            //多选组织
            ComboFieldEditor headComboEidtor = this.View.GetControl <ComboFieldEditor>("FMulSelOrgList_Filter");
            List <EnumItem>  comboOptions    = new List <EnumItem>();
            //获取有查看权限的组织
            List <long> orgIdList = this.GetPremissionOrg("PAWK_PurPayDetailReport");

            foreach (long orgId in orgIdList)
            {
                comboOptions.Add(new EnumItem()
                {
                    EnumId = orgId.ToString(), Value = orgId.ToString(), Caption = new LocaleValue(this.GetOrgName(orgId))
                });
            }
            headComboEidtor.SetComboItems(comboOptions);
            //设置当前多选组织为默认查询组织
            this.View.Model.SetValue("FMulSelOrgList_Filter", this.Context.CurrentOrganizationInfo.ID);
            //设置起始日期:默认本月1号
            DateTime beginDate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);

            this.View.Model.SetValue("FBeginDate_Filter", beginDate);
        }
Exemple #6
0
        public override void AfterBindData(EventArgs e)
        {
            //多选组织
            ComboFieldEditor headComboEidtor = this.View.GetControl <ComboFieldEditor>("FMulSelOrgList_Filter");
            List <EnumItem>  comboOptions    = new List <EnumItem>();
            //获取有查看权限的组织
            List <long> orgIdList = this.GetPremissionOrg("PAWK_PurPayDetailReport");

            foreach (long orgId in orgIdList)
            {
                comboOptions.Add(new EnumItem()
                {
                    EnumId = orgId.ToString(), Value = orgId.ToString(), Caption = new LocaleValue(this.GetOrgName(orgId))
                });
            }
            headComboEidtor.SetComboItems(comboOptions);
            //设置默认组织:高山,阳普生
            this.View.Model.SetValue("FMulSelOrgList_Filter", "1,100246");
            //设置多选下拉列表_公司和事业部
            this.SetMulComboCompany();
            //设置多选下拉列表_部门
            this.SetMulComboDept();
        }
        public override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //单据状态下拉列表
            List <EnumItem> lstBillStatusItems = new List <EnumItem>();

            EnumItem statusItem0 = new EnumItem();

            statusItem0.Value   = "Z";
            statusItem0.Caption = new LocaleValue("暂存");
            lstBillStatusItems.Add(statusItem0);

            EnumItem statusItem1 = new EnumItem();

            statusItem1.Value   = "A";
            statusItem1.Caption = new LocaleValue("创建");
            lstBillStatusItems.Add(statusItem1);

            EnumItem statusItem2 = new EnumItem();

            statusItem2.Value   = "B";
            statusItem2.Caption = new LocaleValue("提交");
            lstBillStatusItems.Add(statusItem2);

            EnumItem statusItem3 = new EnumItem();

            statusItem3.Value   = "C";
            statusItem3.Caption = new LocaleValue("审核");
            lstBillStatusItems.Add(statusItem3);

            EnumItem statusItem4 = new EnumItem();

            statusItem4.Value   = "D";
            statusItem4.Caption = new LocaleValue("重新审核");
            lstBillStatusItems.Add(statusItem4);

            EnumItem statusItem5 = new EnumItem();

            statusItem5.Value   = "E";
            statusItem5.Caption = new LocaleValue("赢单");
            lstBillStatusItems.Add(statusItem5);

            EnumItem statusItem6 = new EnumItem();

            statusItem6.Value   = "F";
            statusItem6.Caption = new LocaleValue("输单");
            lstBillStatusItems.Add(statusItem6);

            EnumItem statusItem7 = new EnumItem();

            statusItem7.Value   = "G";
            statusItem7.Caption = new LocaleValue("执行中");
            lstBillStatusItems.Add(statusItem7);

            EnumItem statusItem8 = new EnumItem();

            statusItem8.Value   = "H";
            statusItem8.Caption = new LocaleValue("评估中");
            lstBillStatusItems.Add(statusItem8);

            ComboFieldEditor comFieldEditor3 = this.View.GetControl <ComboFieldEditor>("F_xy_BillStatus");

            comFieldEditor3.SetComboItems(lstBillStatusItems);
            this.View.Model.SetValue("F_xy_BillStatus", "C");
        }
Exemple #8
0
        public override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //维度下拉列表
            List <EnumItem> lstDimensionItems = new List <EnumItem>();
            EnumItem        item0             = new EnumItem();

            item0.Value   = "1";
            item0.Caption = new LocaleValue("产业");
            lstDimensionItems.Add(item0);
            EnumItem item1 = new EnumItem();

            item1.Value   = "2";
            item1.Caption = new LocaleValue("月份");
            lstDimensionItems.Add(item1);
            EnumItem item2 = new EnumItem();

            item2.Value   = "3";
            item2.Caption = new LocaleValue("省份");
            lstDimensionItems.Add(item2);
            EnumItem item3 = new EnumItem();

            item3.Value   = "4";
            item3.Caption = new LocaleValue("区域");
            lstDimensionItems.Add(item3);

            ComboFieldEditor comFieldEditor = this.View.GetControl <ComboFieldEditor>("F_xy_Dimension");

            comFieldEditor.SetComboItems(lstDimensionItems);
            this.View.Model.SetValue("F_xy_Dimension", "1");

            //年份下拉列表
            int             startYear    = 2015;
            int             currentYear  = DateTime.Now.Year;
            List <EnumItem> lstEnumItems = new List <EnumItem>();

            for (int i = startYear; i <= currentYear; i++)
            {
                EnumItem item = new EnumItem();
                item.Value   = i.ToString();
                item.Caption = new LocaleValue(i.ToString());
                lstEnumItems.Add(item);
            }
            ComboFieldEditor comFieldEditor2 = this.View.GetControl <ComboFieldEditor>("F_xy_Year");

            comFieldEditor2.SetComboItems(lstEnumItems);
            this.View.Model.SetValue("F_xy_Year", currentYear.ToString());

            //单据状态下拉列表
            List <EnumItem> lstBillStatusItems = new List <EnumItem>();

            EnumItem statusItem0 = new EnumItem();

            statusItem0.Value   = "Z";
            statusItem0.Caption = new LocaleValue("暂存");
            lstBillStatusItems.Add(statusItem0);

            EnumItem statusItem1 = new EnumItem();

            statusItem1.Value   = "A";
            statusItem1.Caption = new LocaleValue("创建");
            lstBillStatusItems.Add(statusItem1);

            EnumItem statusItem2 = new EnumItem();

            statusItem2.Value   = "B";
            statusItem2.Caption = new LocaleValue("审核中");
            lstBillStatusItems.Add(statusItem2);

            EnumItem statusItem3 = new EnumItem();

            statusItem3.Value   = "C";
            statusItem3.Caption = new LocaleValue("审核");
            lstBillStatusItems.Add(statusItem3);

            EnumItem statusItem4 = new EnumItem();

            statusItem4.Value   = "D";
            statusItem4.Caption = new LocaleValue("重新审核");
            lstBillStatusItems.Add(statusItem4);

            EnumItem statusItem5 = new EnumItem();

            statusItem5.Value   = "E";
            statusItem5.Caption = new LocaleValue("赢单");
            lstBillStatusItems.Add(statusItem5);

            EnumItem statusItem6 = new EnumItem();

            statusItem6.Value   = "F";
            statusItem6.Caption = new LocaleValue("输单");
            lstBillStatusItems.Add(statusItem6);

            EnumItem statusItem7 = new EnumItem();

            statusItem7.Value   = "G";
            statusItem7.Caption = new LocaleValue("执行中");
            lstBillStatusItems.Add(statusItem7);

            EnumItem statusItem8 = new EnumItem();

            statusItem8.Value   = "H";
            statusItem8.Caption = new LocaleValue("评估中");
            lstBillStatusItems.Add(statusItem8);

            ComboFieldEditor comFieldEditor3 = this.View.GetControl <ComboFieldEditor>("F_xy_BillStatus");

            comFieldEditor3.SetComboItems(lstBillStatusItems);
            this.View.Model.SetValue("F_xy_BillStatus", "C");
        }