Beispiel #1
0
        public ROList(IList <Model.AtBillsIncome> list, string category)
            : this()
        {
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblReportDate.Text += DateTime.Now.ToString("yyyy-MM-dd");
            //if (category == "0")
            //    this.lblReportName.Text = "應收票據作業";
            //if (string.IsNullOrEmpty(category))
            //    this.lblReportName.Text = "應收/付票據作業";

            foreach (var item in list)
            {
                if (item.IncomeCategory == "0")
                {
                    item.IncomeCategory = "Income";
                    item.Customer       = customerManager.Get(item.PassingObject);
                }
                else
                {
                    item.IncomeCategory = "Pay";
                    item.Supplier       = supplierManager.Get(item.PassingObject);
                }
                //if (item.BillsOften == "0")
                //    item.BillsOften = "兌現";
                //else if (item.BillsOften == "1")
                //    item.BillsOften = "作廢";
                //else if (item.BillsOften == "2")
                //    item.BillsOften = "退票";
                //else
                //    item.BillsOften = "";

                this.money += Convert.ToDecimal(item.NotesMoney);
            }
            this.lblTotalMoney.Text = this.money.ToString("F2");
            this.DataSource         = list;
            //this.lblCategory.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_IncomeCategory);
            //this.lblKPDate.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_TheOpenDate, "{0:yyyy-MM-dd}");
            //this.lblId.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_Id);
            //this.lblDQDate.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_Maturity, "{0:yyyy-MM-dd}");
            //this.lblPMMoney.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_NotesMoney, "{0:F2}");
            //this.lblPMId.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_NotesAccount);
            //this.lblBank.DataBindings.Add("Text", this.DataSource, "Bank." + Model.Bank.PROPERTY_BANKNAME);
            //this.lblSubject.DataBindings.Add("Text", this.DataSource, "Subject." + Model.AtAccountSubject.PRO_SubjectName);
            //this.lblCustomer.DataBindings.Add("Text", this.DataSource, "Customer." + Model.Customer.PRO_CustomerFullName);
            //this.lblSupplier.DataBindings.Add("Text", this.DataSource, "Supplier." + Model.Supplier.PROPERTY_SUPPLIERFULLNAME);
            //this.lblYDDate.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_TheJpy, "{0:yyyy-MM-dd}");
            //this.lblChangeDate.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_MoveDay, "{0:yyyy-MM-dd}");
            //this.lblInvoiceState.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_BillsOften);
            //this.lblNote.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_Mark);

            this.TCID.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_Id);
            this.TCDQDate.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_Maturity, "{0:yyyy-MM-dd}");
            this.TCPMMoney.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_NotesMoney, "{0:F2}");
            this.TCBank.DataBindings.Add("Text", this.DataSource, "Bank." + Model.Bank.PROPERTY_BANKNAME);
            this.TCSupplier.DataBindings.Add("Text", this.DataSource, "Supplier." + Model.Supplier.PROPERTY_SUPPLIERSHORTNAME);
            this.TCCustomer.DataBindings.Add("Text", this.DataSource, "Customer." + Model.Customer.PRO_CustomerShortName);
            this.TCChuanPiaoId.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_ChuanPiaoId);
        }
Beispiel #2
0
        private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
        {
            if (flag == 1)
            {
                flag = 0;
                return;
            }

            if (flag == 0)
            {
                // if (flag1 == 0)
                {
                    if (e.Node != null && e.Node.ParentNode != null)
                    {
                        this._customerPackage = CustomerPackageManager.Get(e.Node.Tag.ToString());
                        if (this._customerPackage != null)
                        {
                            this._customerPackage.detail = this.CustomerPackageDetailManager.GetByPackageId(this._customerPackage.CustomerPackageId);


                            this.bindingSource1.DataSource = this._customerPackage.detail;
                            this.action = "view";
                            this.Refresh();
                        }
                    }
                    if (e.Node != null && e.Node.ParentNode == null)
                    {
                        customer = customerManager.Get(e.Node.Tag.ToString());

                        if (this.action == "insert")
                        {
                            this._customerPackage.Customer   = customer;
                            this.newChooseCustomer.EditValue = this._customerPackage.Customer as Model.Customer;
                        }
                    }
                }
                //  flag1 = 0;
            }
        }