Пример #1
0
 protected void LB_Search_Click(object sender, EventArgs e)
 {
     if (CompanyId != Guid.Empty)
     {
         StartDate   = RDP_StartDate.SelectedDate ?? DateTime.MinValue;
         EndDate     = RDP_EndDate.SelectedDate ?? DateTime.MinValue;
         ReceiptType = Convert.ToInt32(RCB_ReceiptType.SelectedValue);
         RGReckoning.Rebind();
     }
 }
Пример #2
0
 protected void RCB_Auditing_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     if (CompanyId != Guid.Empty)
     {
         StartDate   = RDP_StartDate.SelectedDate ?? DateTime.MinValue;
         EndDate     = RDP_EndDate.SelectedDate ?? DateTime.MinValue;
         ReceiptType = Convert.ToInt32(RCB_ReceiptType.SelectedValue);
         RGReckoning.Rebind();
     }
 }
Пример #3
0
        protected void Rcb_FilialeListSelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            var value = e.Value.Trim();

            SelectFilialeId = string.IsNullOrEmpty(value) ? Guid.Empty : new Guid(value);
            RTVCompanyCussent.Nodes.Clear();
            GetCompanyCussent(SelectFilialeId);

            RGReckoning.DataSource = new List <CostReckoningInfo>();
            RGReckoning.DataBind();
        }
Пример #4
0
        //选择往来单位分类树节点
        protected void RadTreeViewCompanyCussent_NodeClick(object sender, RadTreeNodeEventArgs e)
        {
            if (!string.IsNullOrEmpty(e.Node.Value))
            {
                CompanyId = new Guid(e.Node.Value);

                StartDate   = DateTime.MinValue;
                EndDate     = DateTime.MinValue;
                ReceiptType = -1;
                RDP_StartDate.SelectedDate    = null;
                RDP_EndDate.SelectedDate      = null;
                RCB_ReceiptType.SelectedValue = "-1";
                RGReckoning.Rebind();
            }
        }
Пример #5
0
        protected void Rcb_FilialeListSelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            AllCompanyList              = _companyCussent.GetCompanyCussentList();
            AllCompanyBalanceList       = _companyCussent.GetCompanyBalanceList();
            AllCompanyClassList         = _companyClass.GetCompanyClassList();
            AllCompanyBalanceDetailList = _companyCussent.GetCompanyBalanceDetailList();
            var value = e.Value.Trim();

            SelectFilialeId = string.IsNullOrEmpty(value) ? Guid.Empty : new Guid(value);
            FilialeId       = Guid.Empty;
            RTVCompanyCussent.Nodes.Clear();
            GetCompanyCussent();
            PageIndex                    = 0;
            RGReckoning.PageSize         = 20;
            RGReckoning.CurrentPageIndex = 0;
            RGReckoning.VirtualItemCount = 0;
            RGReckoning.DataSource       = new List <ReckoningInfo>();
            RGReckoning.DataBind();
        }
Пример #6
0
        protected void LbUnverifyClick(object sender, EventArgs e)
        {
            if (lbUnverify.Text == ">>未审核单据")
            {
                lbUnverify.Text      = ">>已审核单据";
                CurrentAuditingState = AuditingState.No;
            }
            else
            {
                lbUnverify.Text      = ">>未审核单据";
                CurrentAuditingState = AuditingState.Yes;
            }

            FilialeId      = Guid.Empty;
            CompanyClassId = Guid.Empty;
            CompanyId      = Guid.Empty;
            //note  搜索树节点处理优化  2015-03-19  陈重文
            var rtvNode = RTVCompanyCussent.SelectedNode;

            switch (rtvNode.ToolTip)
            {
            case "Filiale":
                FilialeId = new Guid(rtvNode.Value);
                CompanyId = new Guid(rtvNode.ParentNode.Value);
                RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = false;
                RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = true;
                break;

            case "CompanyClass":
                CompanyClassId = new Guid(rtvNode.Value);
                break;

            case "Company":
            case "SaleFiliale":
            case "ThirdSaleFiliale":
                CompanyId = new Guid(rtvNode.Value);
                if (!string.IsNullOrWhiteSpace(RCB_FilialeList.SelectedValue))
                {
                    //note 门店往来帐显示总账   2015-03-18  陈重文
                    var filialeInfo = CacheCollection.Filiale.Get(CompanyId);
                    if (filialeInfo != null)
                    {
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = true;
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = false;
                    }
                    else
                    {
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = false;
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = true;
                    }
                }
                else
                {
                    RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = true;
                    RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = false;
                }
                break;
            }
            if (SelectFilialeId != Guid.Empty && FilialeId == Guid.Empty)
            {
                FilialeId = SelectFilialeId;
            }
            RGReckoning.Rebind();
        }
Пример #7
0
        protected void LbSearchClick(object sender, EventArgs e)
        {
            var start = RDP_StartDate.SelectedDate ?? DateTime.MinValue;
            var end   = RDP_EndDate.SelectedDate ?? DateTime.MinValue;

            if (IsSerarchYear(start, end, GlobalConfig.KeepYear))
            {
                StartDate          = RDP_StartDate.SelectedDate ?? DateTime.MinValue;
                CurrentReceiptType = (ReceiptType)Convert.ToInt32(RCB_ReceiptType.SelectedValue);
                IsChecked          = Convert.ToInt32(rcbIsChecked.SelectedValue);
                Type           = Convert.ToInt32(Rcb_ReckoningCheckType.SelectedValue);
                FilialeId      = Guid.Empty;
                CompanyClassId = Guid.Empty;
                CompanyId      = Guid.Empty;
                //note  搜索树节点处理优化  2015-03-19  陈重文
                var rtvNode = RTVCompanyCussent.SelectedNode;
                switch (rtvNode.ToolTip)
                {
                case "Filiale":
                    FilialeId = new Guid(rtvNode.Value);
                    CompanyId = new Guid(rtvNode.ParentNode.Value);
                    RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = false;
                    RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = true;
                    break;

                case "CompanyClass":
                    CompanyClassId = new Guid(rtvNode.Value);
                    break;

                case "Company":
                case "SaleFiliale":
                case "ThirdSaleFiliale":
                    CompanyId = new Guid(rtvNode.Value);
                    if (!string.IsNullOrWhiteSpace(RCB_FilialeList.SelectedValue))
                    {
                        //note 门店往来帐显示总账   2015-03-18  陈重文
                        var filialeInfo = CacheCollection.Filiale.Get(CompanyId);
                        if (filialeInfo != null)
                        {
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = false;
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = true;
                        }
                        else
                        {
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = true;
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = false;
                        }
                    }
                    else
                    {
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = true;
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = false;
                    }
                    break;
                }
                var personnelInfo = CurrentSession.Personnel.Get();
                if (personnelInfo.CurrentFilialeId != SelectFilialeId)
                {
                    personnelInfo.CurrentFilialeId = SelectFilialeId;
                    CurrentSession.Personnel.Set(personnelInfo);
                }
                RGReckoning.Rebind();
            }
            else
            {
                RAM.Alert("温馨提示:不支持当前时间段搜索,请检查配置文件!");
            }
        }
Пример #8
0
 protected void RGReckoning_PageIndexChanged(object source, GridPageChangedEventArgs e)
 {
     PageIndex = e.NewPageIndex;
     RGReckoning.Rebind();
 }
Пример #9
0
        //选择往来单位分类树节点
        protected void RadTreeViewCompanyCussent_NodeClick(object sender, RadTreeNodeEventArgs e)
        {
            if (!string.IsNullOrEmpty(e.Node.Value))
            {
                FilialeId      = Guid.Empty;
                CompanyClassId = Guid.Empty;
                CompanyId      = Guid.Empty;
                var rtvNode = e.Node;
                //note  搜索树节点处理优化  2015-03-19  陈重文
                switch (rtvNode.ToolTip)
                {
                case "Filiale":
                    FilialeId = new Guid(rtvNode.Value);
                    CompanyId = new Guid(rtvNode.ParentNode.Value);
                    RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = true;
                    RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = false;
                    break;

                case "CompanyClass":
                    CompanyClassId = new Guid(rtvNode.Value);
                    break;

                case "Company":
                case "SaleFiliale":
                case "ThirdSaleFiliale":
                    CompanyId = new Guid(rtvNode.Value);
                    if (!string.IsNullOrWhiteSpace(RCB_FilialeList.SelectedValue))
                    {
                        //note 门店往来帐显示总账   2015-03-18  陈重文
                        var filialeInfo = CacheCollection.Filiale.Get(CompanyId);
                        if (filialeInfo != null)
                        {
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = true;
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = false;
                        }
                        else
                        {
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = false;
                            RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = true;
                        }
                    }
                    else
                    {
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("NonceTotalled").Visible  = false;
                        RGReckoning.MasterTableView.Columns.FindByUniqueName("ComCurrBalance").Visible = true;
                    }
                    break;
                }
                if (SelectFilialeId != Guid.Empty && FilialeId == Guid.Empty)
                {
                    FilialeId = SelectFilialeId;
                }
                if (CompanyId != Guid.Empty)
                {
                    //取往来单位合同信息
                    var info = _companyCussent.GetCompanyCussent(CompanyId);
                    LB_CompanyCussentInfo.Text = "合同信息:" + (info == null ? "" : info.Description);
                }

                CurrentReceiptType                   = ReceiptType.All;
                RCB_ReceiptType.SelectedValue        = "-1";
                txtTradeCode.Text                    = string.Empty;
                rcbIsChecked.SelectedValue           = "-1";
                Rcb_ReckoningCheckType.SelectedValue = "-1";
                StartDate = RDP_StartDate.SelectedDate ?? DateTime.MinValue;
                RGReckoning.Rebind();
            }
        }