Esempio n. 1
0
 public static string User_reg_Qry(User_reg_Model reg)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("Insert into User_Moible_No values('" + reg.CA_NO + "','" + reg.Mob1 + "," + reg.Mob2 + "," + reg.Mob3 + "," + reg.Mob4 + "," + reg.Mob5 + "') ");
     return sb.ToString();
 }
        public int User_Mobile_reg(User_reg_Model reg_module)
        {
            try
            {

                Database db = DatabaseFactory.CreateDatabase();
                using (DbCommand dbcmd = db.GetSqlStringCommand(Query.User_reg_Qry(reg_module)))
                {
                    int i = Convert.ToInt16(db.ExecuteNonQuery(dbcmd));
                    return i;
                }
            }
            catch (OleDbException e)
            {
                throw e;
            }
        }
Esempio n. 3
0
        public ActionResult Register(User_reg_Model reg_module)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    reg_module.User_reg(reg_module);
                    ModelState.AddModelError("", "Successful Registration");
                    reg_module.CA_NO = "";
                    reg_module.Mob1 = 0;
                    reg_module.Mob2 = 0;
                    reg_module.Mob3 = 0;
                    reg_module.Mob4 = 0;
                    reg_module.Mob5 = 0;
                    return View();
                }
                catch (Exception e)
                {
                    ModelState.AddModelError("", "Already registered.please update your contact details ");
                }
            }

            return View();
        }
Esempio n. 4
0
 public void User_reg(User_reg_Model reg_module)
 {
     try
     {
         User_registration reg = new User_registration();
         reg.User_Mobile_reg(reg_module);
     }
     catch (OleDbException e) { throw e; }
 }