Ejemplo n.º 1
0
        public void InsertBank()
        {
            BankAssociationBO objBankBo            = new BankAssociationBO();
            ApplicationResult objResultsBankInsert = new ApplicationResult();
            BankAssociationBL objBankBl            = new BankAssociationBL();

            if (ViewState["dtBank"] != null)
            {
                DataTable dt = (DataTable)ViewState["dtBank"];

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    objBankBo.TrustMID           = Convert.ToInt32(ViewState["TrustMID"].ToString());
                    objBankBo.SchoolMID          = 0;
                    objBankBo.BankName           = dt.Rows[i]["BankName"].ToString();
                    objBankBo.AccountNameEng     = dt.Rows[i]["AccountNameEng"].ToString();
                    objBankBo.AccountNameGuj     = dt.Rows[i]["AccountNameGuj"].ToString();
                    objBankBo.AccountType        = dt.Rows[i]["AccountType"].ToString();
                    objBankBo.AccountNo          = dt.Rows[i]["AccountNo"].ToString();
                    objBankBo.BranchName         = dt.Rows[i]["BranchName"].ToString();
                    objBankBo.PanNO              = dt.Rows[i]["PanNO"].ToString();
                    objBankBo.IfscCode           = dt.Rows[i]["IfscCode"].ToString();
                    objBankBo.LastModifiedDate   = DateTime.UtcNow.AddHours(5.5).ToString();
                    objBankBo.LastModifiedUserID = Convert.ToInt32(Session[ApplicationSession.USERID]);
                    objResultsBankInsert         = objBankBl.BankAssociation_Insert(objBankBo);
                    if (objResultsBankInsert.status == ApplicationResult.CommonStatusType.SUCCESS)
                    {
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public void InsertBank()
 {
     try
     {
         ApplicationResult objResultsBankInsert = new ApplicationResult();
         DataTable         dt        = (DataTable)ViewState["dtBank"];
         BankAssociationBO objBankBo = new BankAssociationBO();
         BankAssociationBL objBankBl = new BankAssociationBL();
         if (dt != null)
         {
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 objBankBo.SchoolMID          = Convert.ToInt32(ViewState["SchoolMID"].ToString());
                 objBankBo.TrustMID           = 0;
                 objBankBo.BankName           = dt.Rows[i]["BankName"].ToString();
                 objBankBo.AccountNameEng     = dt.Rows[i]["AccountNameEng"].ToString();
                 objBankBo.AccountNameGuj     = dt.Rows[i]["AccountNameGuj"].ToString();
                 objBankBo.AccountType        = dt.Rows[i]["AccountType"].ToString();
                 objBankBo.AccountNo          = dt.Rows[i]["AccountNo"].ToString();
                 objBankBo.BranchName         = dt.Rows[i]["BranchName"].ToString();
                 objBankBo.PanNO              = dt.Rows[i]["PanNO"].ToString();
                 objBankBo.IfscCode           = dt.Rows[i]["IfscCode"].ToString();
                 objBankBo.LastModifiedDate   = DateTime.UtcNow.AddHours(5.5).ToString();
                 objBankBo.LastModifiedUserID = Convert.ToInt32(Session[ApplicationSession.USERID]);
                 objResultsBankInsert         = objBankBl.BankAssociation_Insert(objBankBo);
                 if (objResultsBankInsert.status == ApplicationResult.CommonStatusType.SUCCESS)
                 {
                 }
             }
         }
         ViewState["dtBank"] = "";
     }
     catch (Exception ex)
     {
         logger.Error("Error", ex);
         ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical issue. Please Contact to your administrator.');</script>");
     }
 }