Exemplo n.º 1
0
 public static string User_login_data(User_Login_form reg)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("select * from USER_MOIBLE_NO where substr(MOBILE_NO,1,10)='" + reg.Mobile + "'or substr(MOBILE_NO,12,10)='" + reg.Mobile + "' or substr(MOBILE_NO,23,10)='" + reg.Mobile + "' or substr(MOBILE_NO,34,10)='" + reg.Mobile + "' or substr(MOBILE_NO,45,10)='" + reg.Mobile + "' ");
     return sb.ToString();
 }
Exemplo n.º 2
0
        public ActionResult User_login(User_Login_form user_login)
        {
            try
            {
                if (ModelState.IsValid)
                {

                    DataTable dt = user_login.User_Login_data(user_login);
                    if (dt.Rows.Count == 0)
                    {
                        ModelState.AddModelError("", "you Mobile number is not registerd.plz register first to avail this service");
                    }
                    else
                    {
                        user_complain_reg reg = new user_complain_reg();
                        DataTable dt1 = reg.User_detail(user_login);
                        reg.CA_NO = dt.Rows[0]["CA_NO"].ToString();
                        ISUService service = new ISUService();
                        DataSet ds = new DataSet();
                        ds = service.Z_BAPI_CMS_ISU_CA_DISPLAY("000" + reg.CA_NO, "", "", "", "", "");
                        if (ds.Tables[0].Rows.Count == 0)
                        {
                            ModelState.AddModelError("", "Please Check your CA number.");
                        }
                        else
                        {
                            reg.Address = ds.Tables[0].Rows[0]["House_Number"].ToString() + " " + ds.Tables[0].Rows[0]["Street"].ToString() + " " + ds.Tables[0].Rows[0]["Street2"].ToString() + " " + ds.Tables[0].Rows[0]["Street3"].ToString() + " " + ds.Tables[0].Rows[0]["Street4"].ToString() + ", " + ds.Tables[0].Rows[0]["City"].ToString() + ", PostCode: " + ds.Tables[0].Rows[0]["Post_Code"].ToString() + " .";
                            reg.Consumer_name = ds.Tables[0].Rows[0]["Bp_Name"].ToString();
                            reg.Mob = user_login.Mobile;
                            return RedirectToAction("user_complain_reg", reg);
                        }
                    }
                }
            }
            catch
            {
                ModelState.AddModelError("", "There is some problem in updation,plz try later");
            }
            return View();
        }
Exemplo n.º 3
0
        public DataTable User_login_data(User_Login_form user_login_detail)
        {
            try
            {

                Database db = DatabaseFactory.CreateDatabase();
                using (DbCommand dbcmd = db.GetSqlStringCommand(Query.User_login_data(user_login_detail)))
                {
                    DataTable dt = db.ExecuteDataSet(dbcmd).Tables[0];
                    return dt;
                }
            }
            catch (OleDbException e)
            {
                throw e;
            }
        }
Exemplo n.º 4
0
 public DataTable get_User_detail(User_Login_form reg_module)
 {
     try
     {
         Database db = DatabaseFactory.CreateDatabase();
         using (DbCommand dbcmd = db.GetSqlStringCommand(Query.User_detail_Qry(reg_module)))
         {
             DataTable dt = db.ExecuteDataSet(dbcmd).Tables[0];
             return dt;
         }
     }
     catch (OleDbException e)
     {
         throw e;
     }
 }
Exemplo n.º 5
0
 public DataTable User_Login_data(User_Login_form user_Login_detail)
 {
     try
     {
         User_registration reg = new User_registration();
         DataTable dt = reg.User_login_data(user_Login_detail);
         return dt;
     }
     catch (OleDbException e)
     {
         throw e;
     }
 }
Exemplo n.º 6
0
 public DataTable User_detail(User_Login_form user_login)
 {
     try
     {
         User_detail reg = new User_detail();
         DataTable dt = reg.get_User_detail(user_login);
         return dt;
     }
     catch (OleDbException e)
     {
         throw e;
     }
 }