private void frmUserRight_Load(object sender, EventArgs e) { panel1.Top = (this.Height - panel1.Height) / 2; panel1.Left = (this.Width - panel1.Width) / 2; MyAccount = new AccountTranaction(true); LoadMenu(); Myuser.LoadRolls(cmbUserRoll); }
private void btnPostTpAcc_Click(object sender, EventArgs e) { int BillStatus = -1; if (MessageBox.Show("Do you want post to account ? ", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { MyTransaction = new AccountTranaction(Program.AccountStatic.LoggingAsLocal); // int SupID = int.Parse(MyCommon.GetSelectedID(cmbSupplier, true)); //Edited by manjula string SupName = cmbSupplier.SelectedValue.ToString(); string CreditPeriod = ""; LINKPayment objLink = new LINKPayment(); objLink.SupName = SupName; LINKPayment[] objSuppID = objService.GetCreditorFinalSupplier(objLink); if (objSuppID.Length > 0) { supid = objSuppID[0].SupplierID.ToString(); CreditPeriod = objSuppID[0].CreditPeriod.ToString(); } int SupID = Convert.ToInt32(supid); BillStatus = MyBill.GetBillStatus(cmbGRN.Text, SupID); if (BillStatus == 2) { string respond = ""; // respond = MyTransaction.DoBillTransaction(_ExtData); if (respond == "True") { respond = MyBill.BillAccount(cmbGRN.Text, Program.AccountStatic.UserName, SupID); if (respond == "True") { Program.InformationMessage("Successfully Approved"); } else { Program.VerningMessage(respond); } } else Program.VerningMessage(respond); } else { if (BillStatus == 0) { Program.VerningMessage("This is not send to approval !!!"); } else if (BillStatus == 1) { Program.VerningMessage("This is not Approved Bill !!!"); } else if (BillStatus == 3) { Program.VerningMessage("This Bill Already Accounted !!!"); } } } }
private void btnPostTpAcc_Click(object sender, EventArgs e) { string respond = ""; if (MessageBox.Show("Do you want post this to account ? ", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { AccountTranaction MyTransaction = new AccountTranaction(Program.AccountStatic.LoggingAsLocal); int VoucherStatus = MyReceipt.GetReceiptStatus(txtRcptNumber.Text); switch (VoucherStatus) { case 0: Program.VerningMessage("This is not Approved Voucher !!!......"); break; case 1: Program.VerningMessage("This is not Approved Voucher !!!......"); break; case 2: string PVN = ""; respond = MyTransaction.DoReceipts(_ExtData, Program.AccountStatic.UserName, out PVN); if (respond == "True") { txtRcptNumber.Text = PVN; Program.InformationMessage("Successfully Posted to Account !!!!"); } else { Program.VerningMessage(respond); } break; case 3: Program.VerningMessage("Already Accounted!!! you cannot change ......"); break; default: break; } } }
private void btnPostTpAcc_Click(object sender, EventArgs e) { MyTransaction = new AccountTranaction(Program.AccountStatic.LoggingAsLocal); int Jstatus = MyJournal.GetJEStatus(textJENo.Text); string respond = ""; if (MessageBox.Show("Do you want send to approval ? ", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) { switch (Jstatus) { case 0: Program.VerningMessage("Not approved Journal"); break; case 1: Program.VerningMessage("This Journal still pending approval stage ....."); break; case 2: respond = MyTransaction.DoJournal(_ExtData,Program .AccountStatic.UserName ); if (respond == "True") { Program.InformationMessage("Successfully posted to account ...."); } else { Program.VerningMessage(respond); } break; case 3: Program.VerningMessage("This Journal already Accounted ....."); break; default: break; } } }
private void btnPostTpAcc_Click(object sender, EventArgs e) { if (MessageBox.Show("Do you want to Update Account ?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes) ; { int InvoiceStatus = MyInvoice.GetInvoiceStatus(cmbGRN.Text); switch (InvoiceStatus) { case 1: Program.VerningMessage("Not approved invoice"); break; case 0: Program.VerningMessage("This invoice not in Aproval Stage"); break; case 2: MtTransaction=new AccountTranaction (Program .AccountStatic.LoggingAsLocal); string respond = MtTransaction.DoInvoice(_saveData); if (respond == "True") { Program.InformationMessage("Successfully Posted to account"); } else Program.VerningMessage(respond); break; case 3: Program.VerningMessage("Already Accounted"); break; default: break; } } }