protected override void FillData() { DataTable dtResult = new DataTable(); CommonBl commonBl = new CommonBl(); INV_InvoiceHeaderDto dto = new INV_InvoiceHeaderDto(); dto.Status = this.Status; dto.CompanyCode = this.CompanyCode; commonBl.SelectInvoiceData(dto, out dtResult); if (dtResult.Columns.Count > 0) { if (this.HasNull) { DataRow newRow = dtResult.NewRow(); //newRow[0] = CommonData.StringEmpty; dtResult.Rows.InsertAt(newRow, 0); } } this.Properties.DataSource = dtResult; this.Properties.NullText = CommonData.StringEmpty; //this.EditValue = CommonData.StringEmpty; //base.FillData(); }
public override bool BeforePrint() { #region To do something INV_InvoiceBl invoiceBl = new INV_InvoiceBl(); INV_InvoiceHeaderDto updateDto = ((INV_InvoiceHeaderDto)this.Dto); updateDto.Status = CommonData.InvoiceStatus.Printed; InvoiceResult result = invoiceBl.UpdateInvoiceData(updateDto); #endregion //recognized variable to handle result this.ReturnCode = result.ReturnCode; if (result.ReturnCode == CommonData.DbReturnCode.Succeed) { return(true); } return(false); }