Пример #1
0
        protected void RgCheckHistoryNeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            StartDate = RDP_StartDate.SelectedDate ?? DateTime.Now.AddMonths(-3);
            EndDate   = RDP_EndDate.SelectedDate ?? DateTime.Now;
            Checker   = txtChecker.Text.Trim();
            if (RcbCompanyList.SelectedItem != null && RcbCompanyList.SelectedIndex >= 0)
            {
                CompanyId = new Guid(RcbCompanyList.SelectedItem.Value);
            }
            else
            {
                CompanyId = Guid.Empty;
            }
            int state    = DdlState.SelectedValue == null ? -1 : Convert.ToInt32(DdlState.SelectedValue);
            var enumList = EnumAttribute.GetDict <CheckDataState>();

            int[] splieLIst = { (int)CheckDataState.All, (int)CheckDataState.Deleted };
            int[] states    = enumList.Where(act => !splieLIst.Contains(act.Key)).Select(act => act.Key).ToArray();
            var   list      = _checkDataManagerWrite.GetCheckDataList(CompanyId, -1, Checker, StartDate, EndDate, states);

            switch (state)
            {
            case 0:
                list = list.Where(act => act.CheckDataState <= 7).ToList();
                break;

            case 1:
                list = list.Where(act => act.CheckDataState > 7).ToList();
                break;
            }
            rgCheckHistory.DataSource = list;
        }
        private void BindApplyKindType()
        {
            var dataSource = EnumAttribute.GetDict <ApplyInvoiceSourceType>();

            DdlKindType.DataSource = dataSource;
            DdlKindType.DataBind();
            DdlKindType.SelectedValue = string.Format("{0}", (int)ApplyInvoiceSourceType.All);
        }
Пример #3
0
        /// <summary>
        /// 绑定单据的类型
        /// </summary>
        protected void BindComboBoxReceiptType()
        {
            var typeList = (Dictionary <int, string>)EnumAttribute.GetDict <CompanyFundReceiptType>();

            foreach (var type in typeList)
            {
                RCB_ReceiptType.Items.Add(new RadComboBoxItem(type.Value, string.Format("{0}", type.Key)));
            }
        }
        //对账状态
        protected void LoadCheckTypeStateData()
        {
            var list = EnumAttribute.GetDict <CheckType>().OrderBy(p => p.Key);

            ddl_CheckState.DataSource     = list;
            ddl_CheckState.DataTextField  = "Value";
            ddl_CheckState.DataValueField = "Key";
            ddl_CheckState.DataBind();
        }
        private void BindApplyState()
        {
            var dataSource = EnumAttribute.GetDict <ApplyInvoiceState>();

            dataSource.Remove((int)ApplyInvoiceState.WaitAudit);
            DdlState.DataSource = dataSource;
            DdlState.DataBind();
            DdlState.SelectedValue = string.Format("{0}", (int)ApplyInvoiceState.All);
        }
        /// <summary>
        /// 加载补贴类型列表
        /// </summary>
        public void LoadTypeData()
        {
            var list = EnumAttribute.GetDict <SubsidyType>();

            RcbType.DataSource     = list;
            RcbType.DataTextField  = "Value";
            RcbType.DataValueField = "Key";
            RcbType.DataBind();
        }
Пример #7
0
        //申报类型
        protected void LoadReportKindData()
        {
            var list = EnumAttribute.GetDict <CostReportKind>().OrderBy(p => p.Key);

            rbl_ReportKind.DataSource     = list;
            rbl_ReportKind.DataTextField  = "Value";
            rbl_ReportKind.DataValueField = "Key";
            rbl_ReportKind.DataBind();
            rbl_ReportKind.SelectedValue = string.Format("{0}", (int)CostReportKind.Before);
        }
Пример #8
0
        /// <summary>
        /// 状态
        /// </summary>
        private void BindState()
        {
            var list = EnumAttribute.GetDict <DocumentRedState>();

            ddl_State.DataSource     = list;
            ddl_State.DataTextField  = "Value";
            ddl_State.DataValueField = "Key";
            ddl_State.DataBind();
            ddl_State.Items.Insert(0, new ListItem("全部", ""));
        }
Пример #9
0
        /// <summary>
        /// 红冲类型
        /// </summary>
        private void LoadRedType()
        {
            var list = EnumAttribute.GetDict <RedType>();

            ddl_RedType.DataSource     = list;
            ddl_RedType.DataTextField  = "Value";
            ddl_RedType.DataValueField = "Key";
            ddl_RedType.DataBind();
            ddl_RedType.Items.Insert(0, new ListItem("全部", ""));
        }
Пример #10
0
        //申报类型
        protected void LoadReportKindData()
        {
            var list = EnumAttribute.GetDict <CostReportKind>().OrderBy(p => p.Key);

            ddl_ReportKind.DataSource     = list;
            ddl_ReportKind.DataTextField  = "Value";
            ddl_ReportKind.DataValueField = "Key";
            ddl_ReportKind.DataBind();
            ddl_ReportKind.Items.Insert(0, new ListItem("全部", ""));
        }
Пример #11
0
        //票据状态
        protected void LoadBillStateData()
        {
            var list = EnumAttribute.GetDict <CostReportBillState>();

            ddl_BillState.DataSource     = list;
            ddl_BillState.DataTextField  = "Value";
            ddl_BillState.DataValueField = "Key";
            ddl_BillState.DataBind();
            ddl_BillState.Items.Insert(0, new ListItem("请选择", ""));
        }
Пример #12
0
        /// <summary>加载商品类型
        /// </summary>
        private void LoadGoodsKindType()
        {
            var goodsKindTypeDic = (Dictionary <int, string>)EnumAttribute.GetDict <GoodsKindType>();

            foreach (var item in goodsKindTypeDic.Where(ent => ent.Key != 0))
            {
                RCB_GoodsKingType.Items.Add(new RadComboBoxItem(item.Value, string.Format("{0}", item.Key)));
            }
            RCB_GoodsKingType.Items.Insert(0, new RadComboBoxItem("请选择类型", "0"));
        }
        /// <summary>
        /// 加载状态列表
        /// </summary>
        public void LoadStateData()
        {
            var list = EnumAttribute.GetDict <SubsidyApplyState>();

            list.Remove((int)SubsidyApplyState.WaitRemittance);
            list.Remove((int)SubsidyApplyState.Finished);
            RcbState.DataSource     = list;
            RcbState.DataTextField  = "Value";
            RcbState.DataValueField = "Key";
            RcbState.DataBind();
        }
Пример #14
0
        /// <summary>
        /// 商品类型
        /// </summary>
        protected void LoadGoodsTypeData()
        {
            var goodsTypes = EnumAttribute.GetDict <GoodsKindType>().Where(act => act.Key > 0);
            IDictionary <int, string> date = new Dictionary <int, string>();

            date.Add(0, "全部");
            Rcb_GoodsType.DataSource     = date.Union(goodsTypes);
            Rcb_GoodsType.DataTextField  = "Value";
            Rcb_GoodsType.DataValueField = "Key";
            Rcb_GoodsType.DataBind();
        }
        private void LoadStorageType()
        {
            var dict = EnumAttribute.GetDict <StorageRecordType>();

            RCB_StorageType.Items.Clear();
            RCB_StorageType.Items.Add(new RadComboBoxItem("全部类型", "-1"));
            foreach (var t in dict)
            {
                RCB_StorageType.Items.Add(new RadComboBoxItem(t.Value, string.Format("{0}", t.Key)));
            }
        }
        /// <summary>
        /// 会员体现状态
        /// </summary>
        public void LoadMemberMentionStateData()
        {
            var list = EnumAttribute.GetDict <MemberMentionState>();

            list.Remove((int)MemberMentionState.NoPass);
            list.Remove((int)MemberMentionState.Invalid);
            ddl_MemberMentionState.DataSource     = list;
            ddl_MemberMentionState.DataTextField  = "Value";
            ddl_MemberMentionState.DataValueField = "Key";
            ddl_MemberMentionState.DataBind();
        }
Пример #17
0
        public string GetLinkTradeType(object obj)
        {
            var key           = Convert.ToInt32(obj);
            var linkTradeList = EnumAttribute.GetDict <WasteBookLinkTradeType>();

            if (linkTradeList != null && linkTradeList.ContainsKey(key))
            {
                return(linkTradeList[key]);
            }
            return("未设置");
        }
Пример #18
0
        /// <summary>
        /// 获取确认后状态
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public string GetStateString(object obj)
        {
            int checkDataState = Convert.ToInt32(obj);

            if (checkDataState >= (int)CheckDataState.Inhanding)
            {
                var enumList = EnumAttribute.GetDict <CheckDataState>();
                return(enumList[checkDataState]);
            }
            return("处理中");
        }
Пример #19
0
        ///<summary>
        /// 审核状态绑定
        ///</summary>
        public void BindAuditType()
        {
            var saleStockTypes = (Dictionary <int, string>)EnumAttribute.GetDict <PurchaseSetLogStatue>();

            foreach (KeyValuePair <int, string> kvp in saleStockTypes)
            {
                var item = new RadComboBoxItem(EnumAttribute.GetKeyName((PurchaseSetLogStatue)kvp.Key), string.Format("{0}", kvp.Key));
                RCB_AuditStatue.Items.Add(item);
            }
            RCB_AuditStatue.Items.Insert(0, new RadComboBoxItem("全部", "-1"));
        }
Пример #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ApplyStateList = EnumAttribute.GetDict <ExchangedState>().Where(act => act.Key != (int)ExchangedState.Returning &&
                                                                         act.Key != (int)ExchangedState.ReturnEnd)
                          .ToDictionary(k => k.Key, v => v.Value);
         BindShopList();
         BindExchangedState();
     }
 }
Пример #21
0
        /// <summary>
        /// 绑定审核状态
        /// </summary>
        protected void BindComboBoxVerifyStatus()
        {
            var statusList = (Dictionary <int, string>)EnumAttribute.GetDict <CompanyFundReceiptState>();

            foreach (var status in statusList)
            {
                if (status.Key == -1 || status.Key == -2 || status.Key == -3)
                {
                    RCB_VerifyStatus.Items.Add(new RadComboBoxItem(status.Value, string.Format("{0}", status.Key)));
                }
            }
        }
Пример #22
0
        public Dictionary <int, string> GetInvoiceType()
        {
            var dict = new Dictionary <int, string> {
                { -1, "请选择发票类型" }
            };
            var dt = EnumAttribute.GetDict <CompanyFundReceiptInvoiceType>();

            foreach (var t in dt)
            {
                dict.Add(t.Key, t.Value);
            }
            return(dict);
        }
Пример #23
0
        protected string GetReceiptTypeName(string type)
        {
            var stateDic = (Dictionary <int, string>)EnumAttribute.GetDict <CompanyFundReceiptType>();

            foreach (KeyValuePair <int, string> kvp in stateDic)
            {
                if (type == string.Format("{0}", kvp.Key))
                {
                    return(kvp.Value);
                }
            }
            return("未知类型");
        }
Пример #24
0
        protected string GetReceiptStatus(string receiptStatus)
        {
            var stateDic = (Dictionary <int, string>)EnumAttribute.GetDict <CompanyFundReceiptState>();

            foreach (KeyValuePair <int, string> kvp in stateDic)
            {
                if (receiptStatus == string.Format("{0}", kvp.Key))
                {
                    return(kvp.Value);
                }
            }
            return("未知状态");
        }
Пример #25
0
        /// <summary> 树形控件添加商品类型节点
        /// </summary>
        /// <param name="node"></param>
        private void CreateTypeNode(RadTreeNode node)
        {
            IDictionary <Int32, string> lstEnum = EnumAttribute.GetDict <GoodsKindType>();

            foreach (KeyValuePair <Int32, string> kp in lstEnum)
            {
                if (kp.Key == 0)
                {
                    continue;
                }
                RadTreeNode childNode = CreateNode(kp.Value, false, string.Format("{0}", kp.Key));
                node.Nodes.Add(childNode);
            }
        }
        /// <summary>
        /// 单据状态
        /// </summary>
        private void LoadStorageState()
        {
            var list = EnumAttribute.GetDict <StorageRecordState>();

            DD_StorageState.DataSource     = list;
            DD_StorageState.DataTextField  = "Value";
            DD_StorageState.DataValueField = "Key";
            DD_StorageState.DataBind();
            DD_StorageState.Items.Insert(0, new ListItem("", ""));
            if (DD_StorageState.Items.Count > 1)
            {
                DD_StorageState.SelectedIndex = 1;
            }
        }
Пример #27
0
        //绑定所有状态
        protected void BindStatusDataBound(object sender, EventArgs e)
        {
            var ddlCheckState = (DropDownList)sender;

            if (ddlCheckState != null)
            {
                var stateDic = (Dictionary <int, string>)EnumAttribute.GetDict <CompanyFundReceiptState>();
                foreach (KeyValuePair <int, string> kvp in stateDic)
                {
                    var item = new ListItem(kvp.Value, string.Format("{0}", kvp.Key));
                    ddlCheckState.Items.Add(item);
                }
            }
        }
Пример #28
0
        ///<summary>
        /// 绑定审核状态
        ///</summary>
        public void LoadGoodsAuditState()
        {
            rcb_GoodsAuditState.Items.Insert(0, new RadComboBoxItem("全部", ""));
            var list = EnumAttribute.GetDict <GoodsAuditState>();

            foreach (var item in list)
            {
                if (item.Key.ToString() == "1" || item.Key.ToString() == "2" || item.Key.ToString() == "3")
                {
                    rcb_GoodsAuditState.Items.Add(
                        new RadComboBoxItem("待" + item.Value, item.Key.ToString()));
                }
                else
                {
                    rcb_GoodsAuditState.Items.Add(
                        new RadComboBoxItem(item.Value, item.Key.ToString()));
                }
            }
        }
Пример #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RCB_SearchType.SelectedValue = "3";
                CurrentSearchType            = 3;
                var list = CacheCollection.Filiale.GetHeadList();

                list.Insert(0, new FilialeInfo {
                    ID = Guid.Empty, Name = "全部"
                });
                DDL_Filiale.DataSource     = list;
                DDL_Filiale.DataTextField  = "Name";
                DDL_Filiale.DataValueField = "ID";
                DDL_Filiale.DataBind();
                InformationsGrid.Rebind();
                DDL_HaveInformation.Items.Clear();
                var dict = EnumAttribute.GetDict <SupplierCompleteType>();
                if (dict.Count > 0)
                {
                    foreach (var item in dict.OrderBy(act => act.Key))
                    {
                        DDL_HaveInformation.Items.Add(new RadComboBoxItem(item.Value, string.Format("{0}", item.Key)));
                    }
                }

                DDL_Period.Items.Clear();
                var dicts = EnumAttribute.GetDict <SupplierTimeLimitType>();
                if (dict.Count > 0)
                {
                    foreach (var item in dicts.OrderBy(act => act.Key))
                    {
                        DDL_Period.Items.Add(new RadComboBoxItem(item.Value, string.Format("{0}", item.Key)));
                    }
                }
                if (Request.QueryString["IsWarning"] != null)
                {
                    DDL_Period.SelectedValue = string.Format("{0}", (int)SupplierTimeLimitType.Expire);
                }
                divFiliale.Visible = CurrentSearchType == 1;
            }
        }
Пример #30
0
        protected string GetReceiptStatus(object receiptStatus, object invoiceState)
        {
            var status   = Convert.ToInt32(receiptStatus);
            var state    = Convert.ToInt32(invoiceState);
            var stateDic = (Dictionary <int, string>)EnumAttribute.GetDict <CompanyFundReceiptState>();

            if (status == (int)CompanyFundReceiptState.WaitInvoice)
            {
                if (state > 0)
                {
                    return(EnumAttribute.GetKeyName((ApplyInvoiceState)invoiceState));
                }
                return(stateDic[status]);
            }
            if (status == (int)CompanyFundReceiptState.Audited && state > 0)
            {
                return("已开");
            }
            return(stateDic.ContainsKey(status)? stateDic[status]:"未知状态");
        }