public ActionResult Edit_data_password_authenticate(Password_Authentication PA)
 {
     try
     {
         DataSet ds = _objwl.Edit_data_password_authenticate(PA);
         List<Password_Authentication> Password_Authentication1 = new List<Password_Authentication>();
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.fname = ds.Tables[0];
             foreach (System.Data.DataRow dr in ViewBag.fname.Rows)
             {
                 Password_Authentication1.Add(new Password_Authentication
                 {
                     srno = dr["srno"].ToString(),
                     Corporate = dr["Corporate"].ToString(),
                     CapitalCharNumber = dr["CapitalCharNumber"].ToString(),
                     RequiredNumeric = dr["RequiredNumeric"].ToString(),
                     SpecialCharNumber = dr["SpecialCharNumber"].ToString(),
                     EncriptionKey = dr["EncriptionKey"].ToString(),
                     PasswordMinLength = dr["PasswordMinLength"].ToString(),
                     PasswordExpiryDays = dr["PasswordExpiryDays"].ToString(),
                     //  UserLoginDay = dr["UserLoginDay"].ToString(),
                     NumberOfAttempts = dr["NumberOfAttempts"].ToString(),
                     //  NumberOfAttemptsTime = dr["NumberOfAttemptsTime"].ToString(),
                     OTPExpiryTime = dr["OTPExpiryTime"].ToString(),
                     LastSamePassword = dr["LastSamePassword"].ToString(),
                     UnableCaptcha = dr["UnableCaptcha"].ToString(),
                     // AutoLockScreen = dr["AutoLockScreen"].ToString(),
                     UserUnlockMinut = dr["UserLockMinuts"].ToString(),
                     Continuenumber = dr["Continuenumber"].ToString()
                 });
             }
         }
         var result = Password_Authentication1;
         return Json(new { UserPreferancestep1js = result }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 2
0
        public DataSet Edit_data_password_authenticate(Password_Authentication PA)
        {
            try
            {
                _cn.Open();
                SqlCommand _cmd = new SqlCommand("sp_Edit_PasswordConfiguration", _cn);
                _cmd.CommandType = CommandType.StoredProcedure;
                _cmd.Parameters.AddWithValue("@tablename", "_PasswordConfiguration");
                _cmd.Parameters.AddWithValue("@Corporate", PA.Corporate);
                _cmd.Parameters.AddWithValue("@unit", "0");
                _cmd.Parameters.AddWithValue("@Formcode", "0");
                _cmd.Parameters.AddWithValue("@Formtabcode", "0");
                _cmd.Parameters.AddWithValue("@srno", PA.srno);
                _cmd.Parameters.AddWithValue("@Type", "EditMode");
                _cmd.CommandType = CommandType.StoredProcedure;
                SqlDataAdapter _adp = new SqlDataAdapter(_cmd);
                DataSet _ds = new DataSet();
                _adp.Fill(_ds);
                _adp.Dispose();
                _cmd.Dispose();
                return _ds;
            }
            catch (Exception)
            {

                throw;
            }
            finally
            {
                _cn.Close();
                _cn.Dispose();
            }
        }
 public ActionResult insert_PasswordAuth(Password_Authentication PA)
 {
     try
     {
         DataSet ds = _objwl.insert_PasswordAuth(PA);
         if (ds.Tables[0].Rows.Count > 0)
         {
             ViewBag.srno = ds.Tables[0].Rows[0]["Srno"];
             ViewBag.Message = ds.Tables[0].Rows[0]["msg"];
             if (ds.Tables[0].Rows[0]["Help"].ToString() == "Save" || ds.Tables[0].Rows[0]["Help"].ToString() == "Update")
             { ViewBag.Event = "success"; }
             else if (ds.Tables[0].Rows[0]["Help"].ToString() == "Duplicate")
             { ViewBag.Event = "error"; }
         }
         return Json(new { srno = ViewBag.srno, Event = ViewBag.Event, responseText = ViewBag.Message }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         throw;
     }
 }
Ejemplo n.º 4
0
        public DataSet insert_PasswordAuth(Password_Authentication PA)
        {
            try
            {
                _cn.Open();
                SqlCommand _cmd = new SqlCommand("sp_save_PasswordConfiguration", _cn);
                _cmd.CommandType = CommandType.StoredProcedure;
                _cmd.Parameters.AddWithValue("@srno", PA.srno);
                _cmd.Parameters.AddWithValue("@Corporate", PA.Corporate);

                _cmd.Parameters.AddWithValue("@CapitalCharNumber", PA.CapitalCharNumber);
                _cmd.Parameters.AddWithValue("@RequiredNumeric", PA.RequiredNumeric);
                _cmd.Parameters.AddWithValue("@SpecialCharNumber", PA.SpecialCharNumber);
                _cmd.Parameters.AddWithValue("@EncriptionKey", PA.EncriptionKey);
                _cmd.Parameters.AddWithValue("@PasswordMinLength", PA.PasswordMinLength);
                _cmd.Parameters.AddWithValue("@PasswordExpiryDays", PA.PasswordExpiryDays);
                _cmd.Parameters.AddWithValue("@UserLoginDay", PA.UserLoginDay);      
                _cmd.Parameters.AddWithValue("@NumberOfAttempts", PA.NumberOfAttempts);
                _cmd.Parameters.AddWithValue("@NumberOfAttemptsTime", PA.NumberOfAttemptsTime);
                _cmd.Parameters.AddWithValue("@OTPExpiryTime", PA.OTPExpiryTime);
                _cmd.Parameters.AddWithValue("@LastSamePassword", PA.LastSamePassword);
                _cmd.Parameters.AddWithValue("@UnableCaptcha", PA.UnableCaptcha);
                _cmd.Parameters.AddWithValue("@AutoLockScreen", PA.AutoLockScreen);

                _cmd.Parameters.AddWithValue("@UserLockMinuts", PA.UserUnlockMinut);
                _cmd.Parameters.AddWithValue("@Continuenumber", PA.Continuenumber);

                _cmd.Parameters.AddWithValue("@Attribute1", PA.Attribute1);
                _cmd.Parameters.AddWithValue("@Attribute2", PA.Attribute2);
                _cmd.Parameters.AddWithValue("@Attribute3", PA.Attribute3);
                _cmd.Parameters.AddWithValue("@Attribute4", PA.Attribute4);
                _cmd.Parameters.AddWithValue("@Attribute5", PA.Attribute5);
                _cmd.Parameters.AddWithValue("@Attribute6", PA.Attribute6);
                _cmd.Parameters.AddWithValue("@Attribute7", PA.Attribute7);
                _cmd.Parameters.AddWithValue("@Attribute8", PA.Attribute8);
                _cmd.Parameters.AddWithValue("@Attribute9", PA.Attribute9);
                _cmd.Parameters.AddWithValue("@Attribute10", PA.Attribute10);

                _cmd.Parameters.AddWithValue("@CreatedBy", PA.CreatedBy);
                _cmd.Parameters.AddWithValue("@CorpcentreBy", PA.CorpcentreBy);
                _cmd.Parameters.AddWithValue("@UnitCorpBy", PA.UnitCorpBy);
                _cmd.Parameters.AddWithValue("@TerminalBy", PA.TerminalBy);
                _cmd.Parameters.AddWithValue("@BranchBy", PA.BranchBy);

                SqlDataAdapter adp = new SqlDataAdapter(_cmd);
                DataSet ds = new DataSet();
                adp.Fill(ds);
                adp.Dispose();
                _cmd.Dispose();
                return ds;

            }
            catch
            {
                throw;
            }
            finally
            {
                _cn.Close();
                _cn.Dispose();
            }

        }