protected void Page_Load(object sender, EventArgs e)
        {
            BankBL objBankBL = new BankBL();

            lstBank = objBankBL.GetAllBanks(cnt).ToList();

            AgentsBL objAgentsBL = new AgentsBL();

            lstAgents = objAgentsBL.GetAllAgents(cntt).ToList();

            MajorAccountBL objMajorAccountBL = new MajorAccountBL();

            lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList();

            MinorAccountBL objMinorAccountBL = new MinorAccountBL();

            lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList();

            //divPM.Visible = false;
            //divCheque.Visible = false;
            //divDD.Visible = false;
            //divBank.Visible = false;
            //divCard.Visible = false;
            //divTD.Visible = false;
            //divRN.Visible = false;

            if (!IsPostBack)
            {
                if (Session["ReceiptID"].ToString() != null)
                {
                    int ReceiptID = Convert.ToInt32(Session["ReceiptID"]);
                    GetAccReceiptById(ReceiptID);
                }
            }
        }
Beispiel #2
0
        public ActionResult <ListBankUserAccountResponseModel> GetListBankUserAccount([FromBody] FilterBank filter)
        {
            ListBankUserAccountResponseModel res = new ListBankUserAccountResponseModel();

            try
            {
                BankBL posBL = new BankBL(DbContext);
                var    data  = posBL.GetListUserBankAccount(filter);

                res.Data       = data.data;
                res.TotalData  = data.TotalData;
                res.TotalPages = data.TotalPage;

                res.Message  = "Success";
                res.Response = true;

                return(res);
            }
            catch (Exception ex)
            {
                res.Message  = ex.Message;
                res.Response = false;
                return(res);
            }
        }
Beispiel #3
0
        private void PopulateCheckList()
        {
            grdDoc.DataSource = null;
            if (m_sType == "")
            {
                return;
            }
            DataTable dt = new DataTable();

            dt = BankBL.getCheckList(m_sType);
            grdDoc.DataSource = dt;
            grdViewDoc.PopulateColumns();
            grdViewDoc.Columns["CheckListId"].Visible = false;
            grdViewDoc.Columns["SortOrder"].Visible   = false;
            grdViewDoc.Columns["SysDefault"].Visible  = false;

            grdViewDoc.Appearance.HeaderPanel.Font = new Font(grdViewDoc.Appearance.HeaderPanel.Font, FontStyle.Bold);

            grdViewDoc.Appearance.FocusedCell.BackColor = Color.Teal;
            grdViewDoc.Appearance.FocusedCell.ForeColor = Color.White;
            grdViewDoc.Appearance.FocusedRow.ForeColor  = Color.Teal;
            grdViewDoc.Appearance.FocusedRow.BackColor  = Color.White;

            grdViewDoc.OptionsSelection.EnableAppearanceHideSelection = false;
        }
Beispiel #4
0
        private void btnOK_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (txtBankName.EditValue == null || txtBankName.EditValue.ToString() == "")
            {
                MessageBox.Show("Enter Bank Name"); txtBankName.Focus(); return;
            }
            if (txtIntRate.EditValue == null || txtIntRate.EditValue.ToString() == "")
            {
                MessageBox.Show("Enter Interest Rate"); txtIntRate.Focus(); return;
            }
            if (txtLAmt.EditValue == null || txtLAmt.EditValue.ToString() == "")
            {
                MessageBox.Show("Enter Loan Amount"); txtLAmt.Focus(); return;
            }
            if (txtPDays.EditValue == null || txtPDays.EditValue.ToString() == "")
            {
                MessageBox.Show("Enter Processing Days"); txtPDays.Focus(); return;
            }

            AssignData();
            if (sType == "A")
            {
                iBankId = 0;
                iBankId = BankBL.InsertBank();
            }
            else
            {
                BankBL.UpdateBank();
            }
            Close();
        }
Beispiel #5
0
        private void tlbMenu_DeleteClick()
        {
            try
            {
                Cursor = Cursors.WaitCursor;
                if (XtraMessageBox.Show("Be sure to delete the record?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    if (!ValidarIngreso())
                    {
                        BankBE objE_Bank = new BankBE();
                        objE_Bank.IdBank    = int.Parse(gvBank.GetFocusedRowCellValue("IdBank").ToString());
                        objE_Bank.Login     = Parametros.strUsuarioLogin;
                        objE_Bank.Machine   = WindowsIdentity.GetCurrent().Name.ToString();
                        objE_Bank.IdCompany = Parametros.intEmpresaId;

                        BankBL objBL_Bank = new BankBL();
                        objBL_Bank.Elimina(objE_Bank);
                        XtraMessageBox.Show("The record was successfully deleted.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Cargar();
                    }
                }
                Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #6
0
        private void UpdateChecklIst()
        {
            m_lGridId = 0;

            if (m_bAdd == false)
            {
                m_lGridId = Convert.ToInt32(grdViewDoc.GetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListId"));
            }

            oChkLstBo = new CheckListBO()
            {
                CheckListId = m_lGridId, CheckListName = (grdViewDoc.GetFocusedRowCellValue("CheckListName").ToString()), TypeName = m_sType
            };


            if (m_bAdd == true)
            {
                m_bAns = true;
                oChkLstBo.SortOrder = grdViewDoc.RowCount;
                int iCId = BankBL.InsertCheckList(oChkLstBo);
                grdViewDoc.SetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListId", iCId);
                grdViewDoc.SetRowCellValue(grdViewDoc.FocusedRowHandle, "SysDefault", false);
                grdViewDoc.SetRowCellValue(grdViewDoc.FocusedRowHandle, "SortOrder", oChkLstBo.SortOrder);
                //CommFun.InsertLog(DateTime.Now, "Check List-Add", "N", "Add Check List", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                BsfGlobal.InsertLog(DateTime.Now, "Check List-Add", "N", "Add Check List", m_lGridId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
                m_bAns = false;
            }
            else
            {
                BankBL.UpdateCheckList(oChkLstBo);
                //CommFun.InsertLog(DateTime.Now, "Check List-Edit", "E", "Edit Check List", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                BsfGlobal.InsertLog(DateTime.Now, "Check List-Edit", "E", "Edit Check List", m_lGridId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
            }
        }
Beispiel #7
0
        private void btnEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (DGvTransView.FocusedRowHandle < 0)
            {
                return;
            }

            if (BsfGlobal.FindPermission("Bank-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Bank-Modify");
                return;
            }

            int           iBranchId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("BranchId"));
            frmBankMaster frmBank   = new frmBankMaster();

            //frmBank.Execute(iBranchId, "E");
            //fillData();
            if (frmBank.Execute(iBranchId) == true)
            {
                dt = BankBL.GetBankBranchReg(iBranchId);
                if (dt.Rows.Count > 0)
                {
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "BankName", dt.Rows[0]["BankName"].ToString());
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "Branch", dt.Rows[0]["Branch"].ToString());
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "IFSCCode", dt.Rows[0]["IFSCCode"].ToString());
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "IntRate", dt.Rows[0]["IntRate"].ToString());
                }
                dt.Dispose();
            }
        }
        private void frmManBankEdit_Load(object sender, EventArgs e)
        {
            BSUtils.LoaderLook(cboCurrency, new CurrencyBL().ListaCombo(Parametros.intEmpresaId), "NameCurrency", "IdCurrency", true);

            if (pOperacion == Operacion.Nuevo)
            {
                this.Text = "Bank - New";
            }
            else if (pOperacion == Operacion.Modificar)
            {
                this.Text = "Bank - Update";
                BankBE objE_Bank = null;
                objE_Bank = new BankBL().Selecciona(IdBank);
                if (objE_Bank != null)
                {
                    txtSwift.Text         = objE_Bank.Swift;
                    txtDescripcion.Text   = objE_Bank.NameBank.Trim();
                    cboCurrency.EditValue = objE_Bank.IdCurrency;
                    txtNumberCtaCte.Text  = objE_Bank.NumberCtaCte;
                    txtCodeAba.Text       = objE_Bank.CodeAba;
                    txtAddress.Text       = objE_Bank.Address;
                    txtPhone.Text         = objE_Bank.Phone;
                    txtContact.Text       = objE_Bank.Contac;
                }
            }

            txtDescripcion.Select();
        }
Beispiel #9
0
        private void btnDelete_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (DGvTransView.FocusedRowHandle < 0)
            {
                return;
            }
            if (BsfGlobal.FindPermission("Bank-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Bank-Delete");
                return;
            }

            int iBranchId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("BranchId"));

            if (BankBL.BankFound(iBranchId) == false)
            {
                if (MessageBox.Show("Do You want to Delete?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    BankBL.DeleteBankBranch(iBranchId);
                    DGvTransView.DeleteRow(DGvTransView.FocusedRowHandle);
                    //CommFun.InsertLog(DateTime.Now, "Bank Master-Delete", "D", "Delete Bank Master", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                    BsfGlobal.InsertLog(DateTime.Now, "Bank Master-Delete", "D", "Delete Bank Master", iBranchId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
                }
            }
            else
            {
                MessageBox.Show("Bank Details Used, Can't Delete Row", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            BankBL objBankBL = new BankBL();

            lstBank = objBankBL.GetAllBanks(cnt).ToList();

            SuppliersBL objSuppliersBL = new SuppliersBL();

            lstSuppliers = objSuppliersBL.GetAllSuppliers(cntt).ToList();

            MajorAccountBL objMajorAccountBL = new MajorAccountBL();

            lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList();

            MinorAccountBL objMinorAccountBL = new MinorAccountBL();

            lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList();

            if (!IsPostBack)
            {
                if (Session["PaymentID"].ToString() != null)
                {
                    int PaymentID = Convert.ToInt32(Session["PaymentID"]);
                    GetPaymentsByID(PaymentID);
                }
            }
        }
Beispiel #11
0
        void ExportarExcel(string filename)
        {
            Excel._Application xlApp;
            Excel._Workbook    xlLibro;
            Excel._Worksheet   xlHoja;
            Excel.Sheets       xlHojas;
            xlApp    = new Excel.Application();
            filename = Path.Combine(Directory.GetCurrentDirectory(), "Excel\\Bank.xlsx");
            xlLibro  = xlApp.Workbooks.Open(filename, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
            xlHojas  = xlLibro.Sheets;
            xlHoja   = (Excel._Worksheet)xlHojas[1];

            Cursor.Current = Cursors.WaitCursor;

            try
            {
                int Row       = 6;
                int Secuencia = 1;

                List <BankBE> lstBank = null;
                lstBank = new BankBL().ListaTodosActivo(Parametros.intEmpresaId);
                if (lstBank.Count > 0)
                {
                    xlHoja.Shapes.AddPicture(Path.Combine(Directory.GetCurrentDirectory(), "Logo.jpg"), Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, 1, 1, 100, 60);

                    foreach (var item in lstBank)
                    {
                        xlHoja.Cells[Row, 1] = item.IdBank;
                        xlHoja.Cells[Row, 2] = item.Swift;
                        xlHoja.Cells[Row, 3] = item.NameBank;
                        xlHoja.Cells[Row, 4] = item.NameCurrency;
                        xlHoja.Cells[Row, 5] = item.NumberCtaCte;
                        xlHoja.Cells[Row, 6] = item.CodeAba;
                        xlHoja.Cells[Row, 7] = item.Address;
                        xlHoja.Cells[Row, 8] = item.Phone;
                        xlHoja.Cells[Row, 9] = item.Contac;

                        Row       = Row + 1;
                        Secuencia = Secuencia + 1;
                    }
                }

                xlLibro.SaveAs("C:\\Excel\\Bank.xlsx", Excel.XlFileFormat.xlWorkbookDefault, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Excel.XlSaveAsAccessMode.xlExclusive, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);

                xlLibro.Close(true, Missing.Value, Missing.Value);
                xlApp.Quit();

                Cursor.Current = Cursors.Default;
                XtraMessageBox.Show("It was imported correctly \n The file was generated C:\\Excel\\Bank.xlsx", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                xlLibro.Close(false, Missing.Value, Missing.Value);
                xlApp.Quit();
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message, ex.Source, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #12
0
        private void UpdateData()
        {
            BankInfoBO.FlatId      = m_iFlatId;
            BankInfoBO.BranchId    = m_iBranchId;
            BankInfoBO.LoanPer     = Convert.ToDecimal(txtLAmt.EditValue);
            BankInfoBO.LoanAppDate = Convert.ToDateTime(CommFun.IsNullCheck(dEDate.EditValue, CommFun.datatypes.VarTypeDate));
            BankInfoBO.LoanAccNo   = Convert.ToDecimal(txtAccNo.EditValue);

            BankBL.UpdateBankInfo();
        }
Beispiel #13
0
        public void FillCC()
        {
            try
            {
                if (m_iBranchId == 0)
                {
                    dtCC = new DataTable();
                    dtCC = BankBL.getCostCentre();
                    if (dtCC.Rows.Count == 0)
                    {
                        return;
                    }
                    else
                    {
                        DGVTrans.DataSource = dtCC;
                        dgvTransView.Columns["CostCentreId"].Visible = false;
                        dgvTransView.Columns["Approve"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
                        dgvTransView.Columns["Approve"].Width = 30;
                        dgvTransView.Columns["CostCentreName"].OptionsColumn.AllowEdit = false;
                    }
                }
                else
                {
                    dtCC = new DataTable();
                    dtCC = BankBL.getBankCostCentre(m_iBranchId);
                    DGVTrans.DataSource = dtCC;

                    if (dtCC.Rows.Count == 0)
                    {
                        return;
                    }
                    else
                    {
                        dgvTransView.Columns["CostCentreId"].Visible = false;
                        dgvTransView.Columns["Approve"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
                        dgvTransView.Columns["Approve"].Width = 30;
                        dgvTransView.Columns["CostCentreName"].OptionsColumn.AllowEdit = false;
                    }
                }
                dgvTransView.Appearance.HeaderPanel.Font = new Font(dgvTransView.Appearance.HeaderPanel.Font, FontStyle.Bold);

                dgvTransView.Appearance.FocusedCell.BackColor = Color.Teal;
                dgvTransView.Appearance.FocusedCell.ForeColor = Color.White;
                dgvTransView.Appearance.FocusedRow.ForeColor  = Color.Teal;
                dgvTransView.Appearance.FocusedRow.BackColor  = Color.White;

                dgvTransView.OptionsSelection.EnableAppearanceHideSelection = false;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        protected string GetBank(int bkid)
        {
            List <Bankstbl> lstBank   = new List <Bankstbl>();
            Bankstbl        bnk       = new Bankstbl();
            BankBL          objbankBL = new BankBL();

            lstBank = objbankBL.GetAllBanks(bnk).ToList();
            var bank = lstBank.OfType <Bankstbl>().Where(b => b.BankID == bkid);

            //return bank.First().BankName;
            return(bank.Count() > 0 ? bank.First().BankName : "");
        }
Beispiel #15
0
        private void FillBranch()
        {
            DataTable dt = new DataTable();

            dt = BankBL.getBranchName();

            cboBranch.Properties.DataSource = CommFun.AddAllToDataTable(dt);
            cboBranch.Properties.PopulateColumns();
            cboBranch.Properties.DisplayMember = "BranchName";
            cboBranch.Properties.ValueMember   = "BranchId";
            cboBranch.Properties.Columns["BranchId"].Visible = false;
            cboBranch.Properties.ShowFooter = false;
            cboBranch.Properties.ShowHeader = false;
        }
Beispiel #16
0
 private void FillBank()
 {
     dtBank = new DataTable();
     dtBank = BankBL.GetBankDetails();
     cboBank.Properties.DataSource = dtBank;
     cboBank.Properties.PopulateColumns();
     cboBank.Properties.ValueMember                       = "BankId";
     cboBank.Properties.DisplayMember                     = "BankName";
     cboBank.Properties.Columns["BankId"].Visible         = false;
     cboBank.Properties.Columns["InterestRate"].Visible   = false;
     cboBank.Properties.Columns["LoanAmount"].Visible     = false;
     cboBank.Properties.Columns["ProcessingDays"].Visible = false;
     cboBank.Properties.ShowFooter = false;
     cboBank.Properties.ShowHeader = false;
 }
Beispiel #17
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (grdViewDoc.FocusedRowHandle < 0)
            {
                return;
            }

            if (BsfGlobal.FindPermission("Check List-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Check List-Delete");
                return;
            }
            m_lGridId = Convert.ToInt32(grdViewDoc.GetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListId"));

            if (m_lGridId != 0)
            {
                if (Convert.ToBoolean(grdViewDoc.GetFocusedRowCellValue("SysDefault")) == true)
                {
                    MessageBox.Show("CheckList Used, Do not Delete"); return;
                }

                if (BankBL.DocuFound(m_lGridId) == false)
                {
                    DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (reply == DialogResult.Yes)
                    {
                        BankBL.DeleteChekList(m_lGridId);
                        grdViewDoc.DeleteRow(grdViewDoc.FocusedRowHandle);

                        DataTable dt = new DataTable();
                        dt = grdDoc.DataSource as DataTable;
                        UpdateSortOrder(dt);
                        int iOrder = 0;
                        for (int i = 0; i < grdViewDoc.RowCount; i++)
                        {
                            iOrder = i + 1;
                            grdViewDoc.SetRowCellValue(i, "SortOrder", iOrder);
                        }
                        //CommFun.InsertLog(DateTime.Now, "Check List-Delete", "D", "Delete Check List", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                        BsfGlobal.InsertLog(DateTime.Now, "Check List-Delete", "D", "Delete Check List", m_lGridId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
                    }
                }
                else
                {
                    MessageBox.Show("CheckList Used, Do not Delete");
                }
            }
        }
Beispiel #18
0
        private static void Kontotransaktionen(BankBL.Girokonto DonaldsKonto)
        {


            // Eine Behauptung prüfen im Rahmen des Testframeworks
            Assert.AreEqual(0.0, DonaldsKonto.Guthaben);

            var neueGuthaben = DonaldsKonto.Einzahlen(500);
            Assert.IsTrue(neueGuthaben == 500.0);
            Assert.AreEqual(500.0, DonaldsKonto.Guthaben);

            neueGuthaben = DonaldsKonto.Abheben(200);
            Assert.IsTrue(neueGuthaben == 300.0);
            //Assert.AreEqual(500.0, DonaldsKonto.Guthaben);
            Assert.AreEqual(300.0, DonaldsKonto.Guthaben);
        }
Beispiel #19
0
 private void frmBankEntry_Load(object sender, EventArgs e)
 {
     CommFun.SetMyGraphics();
     if (sType == "E")
     {
         DataTable dt = new DataTable();
         dt = BankBL.getEditBank(iBankId);
         if (dt.Rows.Count > 0)
         {
             txtBankName.EditValue = dt.Rows[0]["BankName"].ToString();
             txtIntRate.EditValue  = Convert.ToDecimal(dt.Rows[0]["InterestRate"]);
             txtLAmt.EditValue     = Convert.ToDecimal(dt.Rows[0]["LoanAmount"]);
             txtPDays.EditValue    = dt.Rows[0]["ProcessingDays"].ToString();
         }
     }
 }
Beispiel #20
0
        public ActionResult <BankResponseModel> EditMasterBank([FromBody] EditBankInputModel data)
        {
            BankResponseModel response = new BankResponseModel();

            try
            {
                BankBL posBL = new BankBL(DbContext);
                return(posBL.Edit(data));
            }
            catch (Exception ex)
            {
                response.Message  = ex.Message;
                response.Response = false;
                return(response);
            }
        }
Beispiel #21
0
 private void cboBank_EditValueChanged(object sender, EventArgs e)
 {
     if (cboBank.EditValue != null)
     {
         BankBE objE_Bank = null;
         objE_Bank = new BankBL().Selecciona(Convert.ToInt32(cboBank.EditValue));
         if (objE_Bank != null)
         {
             txtNumberCtaCte.Text   = objE_Bank.NumberCtaCte;
             txtSwift.Text          = objE_Bank.Swift;
             txtCodeAba.Text        = objE_Bank.CodeAba;
             txtAddressBank.Text    = objE_Bank.Address;
             txtPhone.Text          = objE_Bank.Phone;
             txtRepresentative.Text = objE_Bank.Contac;
         }
     }
 }
Beispiel #22
0
        private void UpdateBank()
        {
            try
            {
                AssignData();
                BankBL.UpdateBankBranch(m_iBranchId, dtCC, dtSlab);
                //string sql = string.Empty;
                //SqlCommand cmd;
                //if (m_iBranchId == 0)
                //{
                //    sql = String.Format("INSERT INTO BankDetails(BankId,Branch,Address1,Address2,City,State,Pincode,Country, ContPerson,IFSCCode,Mobile,Phone,Fax,IntRate,[LoanAmount%],ProcDays,ReqDocs) VALUES ( {0},'{1}','{2}', '{3}','{4}','{5}', '{6}','{7}','{8}','{9}','{10}','{11}','{12}',{13},{14},{15},'{16}') SELECT SCOPE_IDENTITY()", m_iBankId, txtBranch.Text, txtAdd1.Text, txtAdd2.Text, txtCity.Text, txtState.Text, txtPin.Text, txtCountry.Text, txtContact.Text, txtIFSc.Text, txtMobile.Text, txtPhone.Text, txtFax.Text, (txtIntRate.Text.ToString() == string.Empty ? 0 : Convert.ToDecimal(txtIntRate.Text)), (txtLoanPer.Text.ToString() == string.Empty ? 0 : Convert.ToDecimal(txtLoanPer.Text)), Convert.ToInt32(txtPrDays.EditValue), txtDoc.Text);

                //    cmd = new SqlCommand(sql, BsfGlobal.OpenCRMDB());
                //    m_iBranchId = int.Parse(cmd.ExecuteScalar().ToString());
                //    cmd.Dispose();
                //    CommFun.InsertLog(DateTime.Now, "Bank Master-Add", "A", "Add Bank Master", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                //}
                //else
                //{
                //    sql = String.Format("UPDATE BankDetails SET BankId={0},Branch='{1}', Address1='{2}',Address2='{3}',City='{4}', State='{5}',Pincode='{6}',Country='{7}', ContPerson='{8}',IFSCCode='{9}',Mobile='{10}', Phone='{11}',Fax='{12}',IntRate={13}, [LoanAmount%]={14},ProcDays={15},ReqDocs='{16}'  WHERE BranchId={17}",Convert.ToInt32(cboBank.EditValue), txtBranch.Text, txtAdd1.Text, txtAdd2.Text, txtCity.Text, txtState.Text, txtPin.Text, txtCountry.Text, txtContact.Text, txtIFSc.Text, txtMobile.Text, txtPhone.Text, txtFax.Text, (txtIntRate.Text.ToString() == string.Empty ? 0 : Convert.ToDecimal(txtIntRate.Text)), (txtLoanPer.Text.ToString() == string.Empty ? 0 : Convert.ToDecimal(txtLoanPer.Text)),Convert.ToInt32(txtPrDays.EditValue), txtDoc.Text, m_iBranchId);

                //    cmd = new SqlCommand(sql, BsfGlobal.OpenCRMDB());
                //    cmd.ExecuteNonQuery();
                //    cmd.Dispose();
                //    CommFun.InsertLog(DateTime.Now, "Bank Master-Edit", "E", "Edit Bank Master", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                //}

                //sql = String.Format("DELETE FROM BankCC WHERE BranchId={0} ", m_iBranchId);
                //CommFun.CRMExecute(sql);


                //for (int i = 0; i < dtCC.Rows.Count; i++)
                //{
                //    if (Convert.ToBoolean(dtCC.Rows[i]["Approve"]) == true)
                //    {
                //        sql = String.Format("INSERT INTO BankCC(BranchId,CostCentreId,Approval) VALUES( {0},{1},1)", m_iBranchId, dtCC.Rows[i]["CostCentreId"]);
                //        CommFun.CRMExecute(sql);
                //    }
                //}
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Beispiel #23
0
        public void FillData()
        {
            try
            {
                DataTable dt = new DataTable();
                dt = BankBL.getBankBranch(m_iBranchId);

                if (dt.Rows.Count > 0)
                {
                    cboBank.EditValue = Convert.ToInt32(CommFun.IsNullCheck(dt.Rows[0]["BankId"].ToString(), CommFun.datatypes.vartypenumeric));
                    txtBranch.Text    = CommFun.IsNullCheck(dt.Rows[0]["Branch"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtAdd1.Text      = CommFun.IsNullCheck(dt.Rows[0]["Address1"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtAdd2.Text      = CommFun.IsNullCheck(dt.Rows[0]["Address2"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtCity.Text      = CommFun.IsNullCheck(dt.Rows[0]["City"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtState.Text     = CommFun.IsNullCheck(dt.Rows[0]["State"].ToString(), CommFun.datatypes.vartypestring).ToString();

                    txtPin.Text           = CommFun.IsNullCheck(dt.Rows[0]["Pincode"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtCountry.Text       = CommFun.IsNullCheck(dt.Rows[0]["Country"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtContact.Text       = CommFun.IsNullCheck(dt.Rows[0]["ContPerson"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtIFSc.Text          = CommFun.IsNullCheck(dt.Rows[0]["IFSCCode"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtMobile.Text        = CommFun.IsNullCheck(dt.Rows[0]["Mobile"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtPhone.Text         = CommFun.IsNullCheck(dt.Rows[0]["Phone"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtFax.Text           = CommFun.IsNullCheck(dt.Rows[0]["Fax"].ToString(), CommFun.datatypes.vartypestring).ToString();
                    txtIntRate.Text       = CommFun.IsNullCheck(dt.Rows[0]["IntRate"].ToString(), CommFun.datatypes.vartypenumeric).ToString();
                    txtLoanPer.EditValue  = Convert.ToDecimal(dt.Rows[0]["LoanAmount%"].ToString());
                    txtPrDays.EditValue   = Convert.ToInt32(dt.Rows[0]["ProcDays"].ToString());
                    txtDoc.Text           = dt.Rows[0]["ReqDocs"].ToString();
                    txtProcFee.EditValue  = CommFun.IsNullCheck(dt.Rows[0]["ProcessingFee"].ToString(), CommFun.datatypes.vartypenumeric).ToString();
                    txtLegalFee.EditValue = CommFun.IsNullCheck(dt.Rows[0]["LegalFee"].ToString(), CommFun.datatypes.vartypenumeric).ToString();
                    if (Convert.ToInt32(dt.Rows[0]["Insurance"]) == 0)
                    {
                        rGInsurance.SelectedIndex = 0;
                    }
                    else
                    {
                        rGInsurance.SelectedIndex = 1;
                    }
                    txtRemarks.EditValue = CommFun.IsNullCheck(dt.Rows[0]["Remarks"].ToString(), CommFun.datatypes.vartypestring).ToString();
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor = Cursors.WaitCursor;
                if (!ValidarIngreso())
                {
                    BankBL objBL_Bank = new BankBL();
                    BankBE objBank    = new BankBE();

                    objBank.IdBank       = IdBank;
                    objBank.Swift        = txtSwift.Text;
                    objBank.NameBank     = txtDescripcion.Text;
                    objBank.IdCurrency   = Convert.ToInt32(cboCurrency.EditValue);
                    objBank.NumberCtaCte = txtNumberCtaCte.Text;
                    objBank.CodeAba      = txtCodeAba.Text;
                    objBank.Address      = txtAddress.Text;
                    objBank.Phone        = txtPhone.Text;
                    objBank.Contac       = txtContact.Text;
                    objBank.FlagState    = true;
                    objBank.Login        = Parametros.strUsuarioLogin;
                    objBank.Machine      = WindowsIdentity.GetCurrent().Name.ToString();
                    objBank.IdCompany    = Parametros.intEmpresaId;

                    if (pOperacion == Operacion.Nuevo)
                    {
                        objBL_Bank.Inserta(objBank);
                    }
                    else
                    {
                        objBL_Bank.Actualiza(objBank);
                    }

                    this.Close();
                }
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #25
0
        private void FillGrid()
        {
            DataTable dt = new DataTable();

            dt = BankBL.GetBankDetails();
            grdBank.DataSource = dt;

            grdViewBank.Columns["BankId"].Visible = false;
            grdViewBank.BestFitColumns();

            grdViewBank.OptionsCustomization.AllowFilter       = false;
            grdViewBank.OptionsBehavior.AllowIncrementalSearch = true;
            grdViewBank.OptionsView.ShowAutoFilterRow          = false;
            grdViewBank.OptionsView.ShowViewCaption            = false;
            grdViewBank.OptionsView.ShowFooter           = false;
            grdViewBank.OptionsSelection.MultiSelectMode = GridMultiSelectMode.CellSelect;
            grdViewBank.OptionsSelection.InvertSelection = false;
            grdViewBank.OptionsView.ColumnAutoWidth      = true;
            grdViewBank.Appearance.HeaderPanel.Font      = new Font(grdViewBank.Appearance.HeaderPanel.Font, FontStyle.Bold);
        }
Beispiel #26
0
        private void grdViewDoc_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            if (m_bAns == true)
            {
                return;
            }
            int iId = 0;

            if (BsfGlobal.FindPermission("Check List-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Check List-Modify");
                return;
            }

            if (grdViewDoc.IsNewItemRow(grdViewDoc.FocusedRowHandle) == true)
            {
                m_bAdd = true;
            }
            else
            {
                iId    = Convert.ToInt32(grdViewDoc.GetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListId"));
                m_bAdd = false;
            }

            string sCheckName = CommFun.IsNullCheck(grdViewDoc.GetRowCellValue(grdViewDoc.FocusedRowHandle, "CheckListName").ToString(), CommFun.datatypes.vartypestring).ToString().Trim();

            if (sCheckName == "")
            {
                grdViewDoc.CancelUpdateCurrentRow();
                return;
            }

            if (BankBL.CheckListFound(iId, sCheckName, m_sType) == true)
            {
                MessageBox.Show("CheckListName Already Found");
                grdViewDoc.CancelUpdateCurrentRow();
                return;
            }

            UpdateChecklIst();
        }
        protected void GetBank()
        {
            List <Bankstbl> lstBank   = new List <Bankstbl>();
            Bankstbl        bnk       = new Bankstbl();
            BankBL          objbankBL = new BankBL();

            bnk.Status = 1;
            lstBank    = objbankBL.GetBankIsActive(bnk).ToList();
            ListItem l = new ListItem();

            l.Text  = "--Select--";
            l.Value = 0.ToString();
            ddlFromAccount.Items.Add(l);
            foreach (var cnt in lstBank)
            {
                ListItem li = new ListItem();
                li.Text  = cnt.BankName;
                li.Value = cnt.BankID.ToString();
                ddlFromAccount.Items.Add(li);
            }
        }
Beispiel #28
0
        void txtTmpName_Validating(object sender, CancelEventArgs e)
        {
            if (BsfGlobal.FindPermission("Template Documents-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Template Documents-Modify");
                return;
            }
            TextEdit editor = (TextEdit)sender;

            if (CommFun.IsNullCheck(editor.EditValue.ToString(), CommFun.datatypes.vartypestring).ToString().Trim() == "")
            {
                grdViewTemp.CancelUpdateCurrentRow();
                return;
            }

            //if (BankBL.CheckListFound(oChkLstBo.CheckListId, oChkLstBo.CheckListName, m_sType) == true)
            //{
            //    MessageBox.Show("CheckListName Already Found");
            //    return;
            //}

            if (grdViewTemp.IsNewItemRow(grdViewTemp.FocusedRowHandle) == true)
            {
                if (BankBL.TemplateFound(editor.EditValue.ToString(), barEditItem1.EditValue.ToString()) == true)
                {
                    MessageBox.Show("TemplateName Already Found");
                    editor.EditValue = "";
                    return;
                }
                int iTempId = oTempBL.InsertTempname(editor.EditValue.ToString(), barEditItem1.EditValue.ToString());
                grdViewTemp.SetRowCellValue(grdViewTemp.FocusedRowHandle, "TemplateName", editor.EditValue.ToString());
                grdViewTemp.SetRowCellValue(grdViewTemp.FocusedRowHandle, "TemplateId", iTempId);
                grdViewTemp.UpdateCurrentRow();
            }
            else
            {
                int iTempId = Convert.ToInt32(grdViewTemp.GetRowCellValue(grdViewTemp.FocusedRowHandle, "TemplateId").ToString());
                oTempBL.UpdateTemplate(iTempId, editor.EditValue.ToString());
            }
        }
Beispiel #29
0
        public ActionResult <DeleteBankResponseModel> DeleteBank([FromBody] DeleteBankInputModel data)
        {
            DeleteBankResponseModel response = new DeleteBankResponseModel();

            try
            {
                BankBL bl  = new BankBL(DbContext);
                var    res = bl.DeleteBank(data);

                response.data     = res;
                response.Message  = "Success Change status";
                response.Response = true;

                return(response);
            }
            catch (Exception ex)
            {
                response.Message  = ex.Message;
                response.Response = false;
                return(response);
            }
        }
Beispiel #30
0
        private void frmBankInfo_Load(object sender, EventArgs e)
        {
            CommFun.SetMyGraphics();
            FillBranch();
            dEDate.EditValue = DateTime.Now;

            BankInfoBO.FlatId = m_iFlatId;
            DataTable dt = new DataTable();

            dt = BankBL.getLoanInfo();
            if (dt.Rows.Count > 0)
            {
                txtLAmt.EditValue   = dt.Rows[0]["LoanPer"];
                cboBranch.EditValue = Convert.ToInt32(dt.Rows[0]["BranchId"]);
                dEDate.EditValue    = Convert.ToDateTime(CommFun.IsNullCheck(dt.Rows[0]["LoanAppDate"], CommFun.datatypes.VarTypeDate));
                if (Convert.ToDateTime(dEDate.EditValue) == DateTime.MinValue || string.Format("{0:dd-MM-yyyy}", Convert.ToDateTime(dEDate.EditValue)) == "01-01-1900")
                {
                    dEDate.EditValue = null;
                }
                txtAccNo.EditValue = dt.Rows[0]["LoanAccNo"];
            }
        }
Beispiel #31
0
        public ActionResult <InfoBankResponseModel> GetBank(Guid BankID)
        {
            InfoBankResponseModel res = new InfoBankResponseModel();

            try
            {
                BankBL posBL = new BankBL(DbContext);
                var    data  = posBL.GetDetailBank(BankID);

                res.data = data;

                res.Message  = "Success";
                res.Response = true;

                return(res);
            }
            catch (Exception ex)
            {
                res.Message  = ex.Message;
                res.Response = false;
                return(res);
            }
        }