public frmJobList() { InitializeComponent(); MyCommon = new CommonOperations(Program.AccountStatic.LoggingAsLocal); MyPay = new Payment(Program.AccountStatic.LoggingAsLocal); DataTable tb = MyPay.GetProjectList(); MyCommon.LoadDatatoTableWithoutBind(dgvProject, tb, "Load JOBS"); }
private void frmPaymentVoucher_Load(object sender, EventArgs e) { try { MyAccount = new AccountCreation(Program.AccountStatic.LoggingAsLocal); MyCommon = new CommonOperations(Program.AccountStatic.LoggingAsLocal); MyPay = new Payment(Program.AccountStatic.LoggingAsLocal); panel4.Top = (this.Height - panel4.Height) / 2; panel4.Left = (this.Width - panel4.Width) / 2; LoadToCombo(); EnableCurrent(false); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private string SetDetailDataToClass(out List<AccountTypes.Payment_GeneralDetailsDataType> _SaveDetailList) { MyPay = new Payment(Program.AccountStatic.LoggingAsLocal); _SaveDetailList = new List<AccountTypes.Payment_GeneralDetailsDataType>(); try { foreach (DataGridViewRow OneRow in dgvAccList.Rows) { AccountTypes.Payment_GeneralDetailsDataType _OneItem = new AccountTypes.Payment_GeneralDetailsDataType(); _OneItem.AccID = OneRow.Cells["dgvAccList_AccountID"].Value.ToString(); _OneItem.Description = OneRow.Cells["dgvAccList_Memo"].Value.ToString(); bool resp = false; decimal Dr = 0, FDr = 0, Vat = 0, Lexrare = 0; resp = decimal.TryParse(OneRow.Cells["dgvAccList_Amount"].Value.ToString(), out Dr); resp = decimal.TryParse(OneRow.Cells["dgvAccList_Fcur"].Value.ToString(), out FDr); resp = decimal.TryParse(OneRow.Cells["dgvAccList_Vat"].Value.ToString(), out Vat); resp = decimal.TryParse(OneRow.Cells["dgvAccList__ExcRate"].Value.ToString(), out Lexrare); _OneItem.Dr = Dr; _OneItem.Fdr = FDr; _OneItem.ItemNo = int.Parse(OneRow.Cells["dgvAccList_Ref"].Value.ToString()); _OneItem.PvnNo = txtPVNno.Text; _OneItem.Vat = Vat; _OneItem.JobNo = OneRow.Cells["dgvAccList_Job"].Value.ToString(); _OneItem.Exrate = Lexrare; _SaveDetailList.Add(_OneItem); } return "True"; } catch (Exception ex) { return ex.Message; } }