private string SetDataToCLass(out AccountType.AccountCreationDataType _Savedata) { ComboboxItem cmb = new ComboboxItem(); _Savedata = new AccountType.AccountCreationDataType(); _Savedata.AccountID = txtAccID.Text; _Savedata.AccountName = txtAccountDescription.Text; _Savedata.AccountStatus = int.Parse(cmb.GetReleventTextFromID(cmbAccStatus, cmbAccStatus.Text, false)); _Savedata.BankAccountNo = cmbBankAccountNo.Text; _Savedata.CreatedUser = Program.AccountStatic.UserName; _Savedata.Currency = cmbCurrenyType.Text; if (chkIsSubaccount.CheckState == CheckState.Checked) { _Savedata.IsSubAccount = 1; _Savedata.MainAccountID = cmb.GetReleventTextFromID(cmbMainAccount, cmbMainAccount.Text, false); } else { _Savedata.IsSubAccount = 0; _Savedata.MainAccountID = "0"; } _Savedata.lastaccdate = DateTime.Today; _Savedata.MainAccType = int.Parse(cmb.GetReleventTextFromID(cmbAccountType, cmbAccountType.Text, false)); _Savedata.CompanyID = Program.AccountStatic.CompanyID; return("True"); }
private void DisplayExtData(string AccNo) { AccountType.AccountCreationDataType _Savedata = new AccountType.AccountCreationDataType(); string respond = MyAccount.GetExistAccountCreation(AccNo, out _Savedata); InitializeScreen(); ComboboxItem cmb = new ComboboxItem(); if (respond == "True") { txtAccID.Text = _Savedata.AccountID.ToString(); txtAccountDescription.Text = _Savedata.AccountName; cmbAccountType.Text = cmb.GetReleventTextFromID(cmbAccountType, _Savedata.MainAccType.ToString(), true); if (_Savedata.IsSubAccount == 1) { chkIsSubaccount.CheckState = CheckState.Checked; cmbMainAccount.Text = cmb.GetReleventTextFromID(cmbMainAccount, _Savedata.MainAccountID.ToString(), true); } else { chkIsSubaccount.CheckState = CheckState.Unchecked; } cmbCurrenyType.Text = cmb.GetReleventTextFromID(cmbCurrenyType, _Savedata.Currency, true); cmbBankAccountNo.Text = _Savedata.BankAccountNo; cmbAccStatus.Text = cmb.GetReleventTextFromID(cmbAccStatus, _Savedata.AccountStatus.ToString(), true); } }
private void InitializeScreen() { ComboboxItem cmb = new ComboboxItem(); MyCommon.ClearCurrentPanel(ref panel7); MyAccount.LoadAccountType(cmbAccountType); MyAccount.LoadAccountType(cmbSearchAccType); MyCommon.LoadStatusComboAccount(cmbAccStatus, 1); MyAccount.LoadCurrency(cmbCurrenyType); cmbCurrenyType.Text = cmb.GetReleventTextFromID(cmbCurrenyType, "LKR", true); cmbAccStatus.Text = cmb.GetReleventTextFromID(cmbAccStatus, "1", true); }
private void cmbSearchAccType_SelectedIndexChanged(object sender, EventArgs e) { ComboboxItem cmb = new ComboboxItem(); string CatID = cmb.GetReleventTextFromID(cmbSearchAccType, cmbSearchAccType.Text, false); DataTable tb = MyAccount.GetAccountListByCat(Program.AccountStatic.CompanyID, 1, int.Parse(CatID)); MyCommon.LoadDatatoTableWithoutBind(dgvAccountList, tb, "Load Account List"); }
private void cmbCompanyName_SelectedIndexChanged(object sender, EventArgs e) { ComboboxItem cmb = new ComboboxItem(); Program.AccountStatic.CompanyID = int.Parse(cmb.GetReleventTextFromID(cmbCompanyName, cmbCompanyName.Text, false)); txtUserName.Enabled = true; txtPWD.Enabled = true; }
private void cmbAccountType_SelectedIndexChanged(object sender, EventArgs e) { ComboboxItem cmb = new ComboboxItem(); if (cmb.GetReleventTextFromID(cmbAccountType, cmbAccountType.Text, false) == "1") { cmbBankAccountNo.Enabled = true; } else { cmbBankAccountNo.Enabled = false; } }
private void DisplayExtDetails(string RcptNumber) { string respond = ""; respond = MyReceipt.GetExistReceipt(RcptNumber, out _ExtData); ComboboxItem cmb = new ComboboxItem(); if (respond == "True") { txtRcptNumber.Text = _ExtData.ReceiptID; cmbFromAcc.Text = cmb.GetReleventTextFromID(cmbFromAcc, _ExtData.AccountID, true); cmbPayFor.Text = cmb.GetReleventTextFromID(cmbPayFor, _ExtData.RcptFromCatID.ToString(), true); cmbPayMethod.Text = cmb.GetReleventTextFromID(cmbPayMethod, _ExtData.ReceiptMethod.ToString(), true); cmbPayTo.Text = _ExtData.RcptFromName; cmbPayTo_SelectedIndexChanged(null, null); txtfromMemo.Text = _ExtData.Description; dtpPVNDate.Value = _ExtData.RcptActualDate; DataTable tb = MyReceipt.GetReceiptDetailsList(RcptNumber); MyCommon.LoadDatatoTableWithoutBind(dgvAccList, tb, "Load Payment list"); CalTotalLine(); } tabControl1.SelectTab(0); }
private void DisplayExtDetails(string PVN) { string respond = ""; respond = MyPay.GetExistPayment_General(PVN, out _ExtData); ComboboxItem cmb = new ComboboxItem(); if (respond == "True") { //Added By manju if (_ExtData.PayStatus == 3) { btnPrint.Enabled = true; } txtPVNno.Text = _ExtData.PaymentID; cmbFromAcc.Text = cmb.GetReleventTextFromID(cmbFromAcc, _ExtData.AccountID, true); cmbPayFor.Text = cmb.GetReleventTextFromID(cmbPayFor, _ExtData.PayToCatID.ToString(), true); cmbPayMethod.Text = cmb.GetReleventTextFromID(cmbPayMethod, _ExtData.PaymentMethod.ToString(), true); cmbPayTo.Text = _ExtData.PayToName; cmbPayTo_SelectedIndexChanged(null, null); txtfromMemo.Text = _ExtData.Description; dtpPVNDate.Value = _ExtData.PayActualDate; if (_ExtData.IsAdvancePayment == 1) { chkAsAdvancePayment.Checked = true; } else { chkAsAdvancePayment.Checked = false; } DataTable tb = MyPay.GetPAyDetailList(PVN); MyCommon.LoadDatatoTableWithoutBind(dgvAccList, tb, "Load Payment list"); CalTotalLine(); } tabControl1.SelectTab(0); }
private void DisplayData() { ComboboxItem cmb = new ComboboxItem(); cmbGRN.Text = _saveData.InvoiceNo; cmbSupplier.Text = cmb.GetReleventTextFromID(cmbSupplier, _saveData.RcvFromID.ToString(), true); dtpInvoiceDate.Value = _saveData.InvoiceDate; // dtpBilingDate.Value = _saveData. txtDescription.Text = _saveData.Description; DataTable tb = MyInvoice.GetExistInvoiceDetails(cmbGRN.Text); lblDueDate.Text = _saveData.TobeRcvDate.ToString("dd/MMM/yyyy"); MyCommon.LoadDatatoTableWithoutBind(dgvAccount, tb, "Load deails"); CalTotalAmount(); tabControl1.SelectTab(0); }
private void cmbFromAcc_SelectedIndexChanged(object sender, EventArgs e) { string GetFromAccID = ""; GetFromAccID = MyCommon.GetSelectedID(cmbFromAcc, true); string Currentcy = ""; txtExRate.Text = MyAccount.GetExRate(GetFromAccID, out Currentcy).ToString(); lblCurrentcy.Text = Currentcy; decimal FinalBalance = 0; string rspt = MyAccount.GetFinalBalance(GetFromAccID, Program.AccountStatic.CurrentAccPeriod, out FinalBalance); lblBalance.Text = FinalBalance.ToString("##0.00"); if (GetFromAccID == "10000") { ComboboxItem cmb = new ComboboxItem(); cmbPayMethod.Text = cmb.GetReleventTextFromID(cmbPayMethod, "1", true); cmbPayMethod.Enabled = false; } else { cmbPayMethod.Enabled = true; } }
private void cmbCurrency_SelectedIndexChanged(object sender, EventArgs e) { ComboboxItem cmb = new ComboboxItem(); lblExrate.Text = cmb.GetReleventTextFromID(cmbCurrency, cmbCurrency.Text, false); }