Ejemplo n.º 1
0
 public static string User_update_Qry(User_update_detail reg)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("update User_Moible_No set MOBILE_NO='" + reg.Mob1 + "," + reg.Mob2 + "," + reg.Mob3 + "," + reg.Mob4 + "," + reg.Mob5 + "' where CA_NO='" + reg.CA_NO + "' ");
     return sb.ToString();
 }
Ejemplo n.º 2
0
 public static string User_retrive_data(User_update_detail reg)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append(" select substr(MOBILE_NO,1,10) mob1,substr(MOBILE_NO,12,10)mob2,substr(MOBILE_NO,23,10) mob3,substr(MOBILE_NO,34,10) mob4,substr(MOBILE_NO,45,10)mob5 from USER_MOIBLE_NO where CA_NO='" + reg.CA_NO + "' ");
     return sb.ToString();
 }
Ejemplo n.º 3
0
 public ActionResult Update_user_detail(User_update_detail user_update_detail, string command)
 {
     try
     {
         if (ModelState.IsValid)
         {
             if (command == "Update")
             {
                 user_update_detail.User_update_data(user_update_detail);
                 ModelState.Clear();
                 ModelState.AddModelError("", "Updation perfromed.Now you can enjoy OMS web application service");
                 user_update_detail.Mob1 = 0;
                 user_update_detail.Mob2 = 0;
                 user_update_detail.Mob3 = 0;
                 user_update_detail.Mob4 = 0;
                 user_update_detail.Mob5 = 0;
             }
         }
     }
     catch
     {
         ModelState.AddModelError("", "There is some problem in updation,plz try later");
     }
     return View();
 }
Ejemplo n.º 4
0
 public ActionResult User_retrive_data(User_update_detail user_update_detail, string command)
 {
     try
     {
         if (command == "Get Detail")
         {
             DataTable dt = user_update_detail.User_retrive_data(user_update_detail);
             if (dt.Rows.Count == 0)
             {
                 ModelState.Clear();
                 ModelState.AddModelError("", "Not Registered,plz register first.");
                 user_update_detail.CA_NO = "";
                 user_update_detail.Mob1 = 0;
                 user_update_detail.Mob2 = 0;
                 user_update_detail.Mob3 = 0;
                 user_update_detail.Mob4 = 0;
                 user_update_detail.Mob5 = 0;
             }
             else
             {
                 ModelState.Clear();
                 user_update_detail.Mob1 = Convert.ToInt64(dt.Rows[0]["MOB1"]);
                 user_update_detail.Mob2 = Convert.ToInt64(dt.Rows[0]["MOB2"]);
                 user_update_detail.Mob3 = Convert.ToInt64(dt.Rows[0]["MOB3"]);
                 user_update_detail.Mob4 = Convert.ToInt64(dt.Rows[0]["MOB4"]);
                 user_update_detail.Mob5 = Convert.ToInt64(dt.Rows[0]["MOB5"]);
                 return RedirectToAction("Update_user_detail", user_update_detail);
             }
         }
         else
         {
             ModelState.Clear();
             user_update_detail.CA_NO = "";
         }
     }
     catch
     {
         ModelState.AddModelError("", "Not Registered,plz register first.");
     }
     return View();
 }
Ejemplo n.º 5
0
 public ActionResult Update_user_detail(User_update_detail user_update_detail)
 {
     return View(user_update_detail);
 }
Ejemplo n.º 6
0
        public void User_update_data(User_update_detail user_update_detail)
        {
            try
            {

                Database db = DatabaseFactory.CreateDatabase();
                using (DbCommand dbcmd = db.GetSqlStringCommand(Query.User_update_Qry(user_update_detail)))
                {
                    db.ExecuteDataSet(dbcmd);

                }
            }
            catch (OleDbException e)
            {
                throw e;
            }
        }
Ejemplo n.º 7
0
        public DataTable User_retrive_data(User_update_detail user_update_detail)
        {
            try
            {

                Database db = DatabaseFactory.CreateDatabase();
                using (DbCommand dbcmd = db.GetSqlStringCommand(Query.User_retrive_data(user_update_detail)))
                {
                    return db.ExecuteDataSet(dbcmd).Tables[0];
                }
            }
            catch (OleDbException e)
            {
                throw e;
            }
        }
Ejemplo n.º 8
0
        public void User_update_data(User_update_detail user_update_detail)
        {
            try
            {
                User_registration reg = new User_registration();
                reg.User_update_data(user_update_detail);

            }
            catch (OleDbException e)
            {
                throw e;

            }
        }
Ejemplo n.º 9
0
 public DataTable User_retrive_data(User_update_detail user_update_detail)
 {
     try
     {
         User_registration reg = new User_registration();
         DataTable dt = reg.User_retrive_data(user_update_detail);
         return dt;
     }
     catch (OleDbException e)
     {
         throw e;
     }
 }