Ejemplo n.º 1
0
        public ROFP(Model.ShouldPayAccountDetail shouldPayAccountDetail)
            : this()
        {
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblReportName.Text  = "應付賬款發票";
            //this.lblDateRange.Text = fp.StartDate.ToString("yyyy-MM-dd") + " - " + fp.EndDate.ToString("yyyy-MM-dd");
            //this.lblSupplier.Text = fp.Supplier.SupplierFullName;
            this.lblReportDate.Text += DateTime.Now.ToString("yyyy-MM-dd");

            IList <Model.ShouldPayAccountDetail> list = new List <Model.ShouldPayAccountDetail>();

            list.Add(shouldPayAccountDetail);
            this.DataSource = list;
            foreach (var item in list)
            {
                //item.FPSupplier = supplierManager.Get(item.FPSupplierId);
                item.HeaderName = companyManager.SelectCompanyName(item.FPHeader);
            }
            this.TCFPDate.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPDate, "{0:yyyy-MM-dd}");
            this.TCFPId.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPId);
            this.TCFPSupplier.DataBindings.Add("Text", this.DataSource, "FPSupplier.SupplierFullName");
            this.TCFPHeader.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_HeaderName);
            this.TCFPMoney.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPMoney, "{0:0.##}");
            this.TCFPTax.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPTax, "{0:0.##}");
            this.TCFPTotalMoney.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPTotalMoney, "{0:0.##}");
        }
Ejemplo n.º 2
0
 public void ValiDate(Model.ShouldPayAccountDetail shouldPayAccountDetail)
 {
     if (string.IsNullOrEmpty(shouldPayAccountDetail.FPId))
     {
         throw new Helper.MessageValueException("Invoice No. can not be empty!");
     }
 }
Ejemplo n.º 3
0
 public void ValiDate(Model.ShouldPayAccountDetail shouldPayAccountDetail)
 {
     if (string.IsNullOrEmpty(shouldPayAccountDetail.FPId))
     {
         throw new Helper.MessageValueException("發票編號不能為空!");
     }
 }
Ejemplo n.º 4
0
 protected override void AddNew()
 {
     this._shouldPayAccountDetail = new Book.Model.ShouldPayAccountDetail();
     this._shouldPayAccountDetail.ShouldPayAccountDetailId = Guid.NewGuid().ToString();
     this._shouldPayAccountDetail.FPDate = DateTime.Now;
     this.action = "insert";
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Update a ShouldPayAccountDetail.
 /// </summary>
 public void Update(Model.ShouldPayAccountDetail shouldPayAccountDetail)
 {
     //
     // todo: add other logic here.
     //
     this.ValiDate(shouldPayAccountDetail);
     shouldPayAccountDetail.UpdateTime = DateTime.Now;
     accessor.Update(shouldPayAccountDetail);
 }
Ejemplo n.º 6
0
 protected override void MoveNext()
 {
     Model.ShouldPayAccountDetail model = this.shouldPayAccountDetailManager.GetNext(this._shouldPayAccountDetail);
     if (model == null)
     {
         throw new InvalidOperationException(Properties.Resources.ErrorNoMoreRows);
     }
     this._shouldPayAccountDetail = this.shouldPayAccountDetailManager.Get(model.ShouldPayAccountDetailId);
 }
Ejemplo n.º 7
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ListForm f = new ListForm();

            if (f.ShowDialog(this) == DialogResult.OK)
            {
                this._shouldPayAccountDetail = f.SelectItem;
                this.Refresh();
            }
        }
Ejemplo n.º 8
0
 protected override void Delete()
 {
     if (this._shouldPayAccountDetail == null)
     {
         return;
     }
     if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
     {
         this.shouldPayAccountDetailManager.Delete(this._shouldPayAccountDetail.ShouldPayAccountDetailId);
         MessageBox.Show("Delete success!");
     }
     Model.ShouldPayAccountDetail model = this.shouldPayAccountDetailManager.GetNext(this._shouldPayAccountDetail);
     if (model == null)
     {
         this._shouldPayAccountDetail = this.shouldPayAccountDetailManager.GetLast();
     }
     else
     {
         this._shouldPayAccountDetail = model;
     }
 }
Ejemplo n.º 9
0
        public ROFP(Model.ShouldPayAccountDetail shouldPayAccountDetail)
            : this()
        {
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblReportName.Text  = "Accounts payable invoice";
            //this.lblDateRange.Text = fp.StartDate.ToString("yyyy-MM-dd") + " - " + fp.EndDate.ToString("yyyy-MM-dd");
            //this.lblSupplier.Text = fp.Supplier.SupplierFullName;
            this.lblReportDate.Text += DateTime.Now.ToString("yyyy-MM-dd");

            IList <Model.ShouldPayAccountDetail> list = new List <Model.ShouldPayAccountDetail>();

            list.Add(shouldPayAccountDetail);
            this.DataSource = list;

            this.TCFPDate.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPDate, "{0:yyyy-MM-dd}");
            this.TCFPId.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPId);
            this.TCFPSupplier.DataBindings.Add("Text", this.DataSource, "FPSupplier.SupplierFullName");
            this.TCFPHeader.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPHeader);
            this.TCFPMoney.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPMoney, "{0:0.##}");
            this.TCFPTax.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPTax, "{0:0.##}");
            this.TCFPTotalMoney.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPTotalMoney, "{0:0.##}");
        }
Ejemplo n.º 10
0
        public override void Refresh()
        {
            if (this._shouldPayAccountDetail == null)
            {
                this.AddNew();
            }
            else
            {
                if (this.action == "view")
                {
                    this._shouldPayAccountDetail = this.shouldPayAccountDetailManager.Get(this._shouldPayAccountDetail.ShouldPayAccountDetailId);
                }
            }

            this.date_YFFP.EditValue      = this._shouldPayAccountDetail.FPDate;
            this.txt_FPId.EditValue       = this._shouldPayAccountDetail.FPId;
            this.nccSupplier.EditValue    = this._shouldPayAccountDetail.FPSupplier;
            this.cob_FPHeader.EditValue   = this._shouldPayAccountDetail.FPHeader;
            this.spe_Money.EditValue      = this._shouldPayAccountDetail.FPMoney == null ? 0 : this._shouldPayAccountDetail.FPMoney.Value;
            this.spe_Tax.EditValue        = this._shouldPayAccountDetail.FPTax == null ? 0 : this._shouldPayAccountDetail.FPTax.Value;
            this.spe_TotalMoney.EditValue = this._shouldPayAccountDetail.FPTotalMoney == null ? 0 : this._shouldPayAccountDetail.FPTotalMoney.Value;
            base.Refresh();
        }
Ejemplo n.º 11
0
 protected override void MoveLast()
 {
     this._shouldPayAccountDetail = this.shouldPayAccountDetailManager.Get(this.shouldPayAccountDetailManager.GetLast() == null ? "" : this.shouldPayAccountDetailManager.GetLast().ShouldPayAccountDetailId);
 }
 public Model.ShouldPayAccountDetail GetNext(Model.ShouldPayAccountDetail e)
 {
     return(accessor.GetNext(e));
 }
 public bool HasRowsBefore(Model.ShouldPayAccountDetail e)
 {
     return(accessor.HasRowsBefore(e));
 }
 public bool HasRowsBefore(Model.ShouldPayAccountDetail e)
 {
     return(sqlmapper.QueryForObject <bool>("ShouldPayAccountDetail.has_rows_before", e));
 }
 public void Update(Model.ShouldPayAccountDetail e)
 {
     this.Update <Model.ShouldPayAccountDetail>(e);
 }
 public void Insert(Model.ShouldPayAccountDetail e)
 {
     this.Insert <Model.ShouldPayAccountDetail>(e);
 }
 public Model.ShouldPayAccountDetail GetPrev(Model.ShouldPayAccountDetail e)
 {
     return(sqlmapper.QueryForObject <Model.ShouldPayAccountDetail>("ShouldPayAccountDetail.get_prev", e));
 }
 public bool HasRowsAfter(Model.ShouldPayAccountDetail e)
 {
     return(sqlmapper.QueryForObject <bool>("ShouldPayAccountDetail.has_rows_after", e));
 }
 public bool HasRowsAfter(Model.ShouldPayAccountDetail e)
 {
     return(accessor.HasRowsAfter(e));
 }