Exemplo n.º 1
0
        public int CheckDuplicate(UserShema objUserShema)
        {
            try
            {
                using (SqlConnection objConn = SQLHelper.OpenConnection())
                {
                    using (SqlTransaction objTran = objConn.BeginTransaction())
                    {
                        var param = new SqlParameter[]
                        {
                            new SqlParameter("@Mobile", objUserShema.Mobile == null ? (object)DBNull.Value: objUserShema.Mobile),
                            new SqlParameter("@OutValue", SqlDbType.Int, 2, ParameterDirection.Output, true, 0, 0, "OutValue", DataRowVersion.Current, "")
                        };

                        int result = SQLHelper.ExecuteNonQuery(objConn, objTran, CommandType.StoredProcedure, "Usp_CheckMobile", param);
                        int count  = Convert.ToInt32(param[1].Value);
                        return(count);
                    }
                }
            }
            catch (Exception ee)
            {
                return(0);
            }
            finally
            {
            }
        }
Exemplo n.º 2
0
 public int insertUserData(UserShema objuserShema)
 {
     try
     {
         objUserDAL = new UserDAL();
         returnval  = objUserDAL.insertUserData(objuserShema);
         return(returnval);
     }
     catch (Exception e) { return(0); }
     finally
     {
         objUserDAL   = null;
         objuserShema = null;
     }
 }
Exemplo n.º 3
0
 public int CheckDuplicate(UserShema objuserShema)
 {
     try
     {
         objUserDAL = new UserDAL();
         returnval  = objUserDAL.CheckDuplicate(objuserShema);
         return(returnval);
     }
     catch (Exception e)
     {
         return(0);
     }
     finally
     {
         //objUserDAL = null;
         //objuserShema = null;
     }
 }
Exemplo n.º 4
0
        //public static string MudraUserDetails(string name, string mobile, string BusinessPurpose, string loantype, string amount)
        public static string CheckDuplicate(string MobileNo)
        {
            UserShema  objUserShema  = new UserShema();
            UserDataBL objUserDataBL = new UserDataBL();
            string     mudraresult   = string.Empty;
            int        result        = 0;

            objUserShema.Mobile = MobileNo;
            result = objUserDataBL.CheckDuplicate(objUserShema);
            if (result > 0)
            {
                mudraresult = "success";
            }
            else
            {
                mudraresult = "Failed";
            }
            return(mudraresult);
        }
Exemplo n.º 5
0
        //public static string MudraUserDetails(string name, string mobile, string BusinessPurpose, string loantype, string amount)
        public static string MudraUserDetails(string name, string mobile, string BusinessPurpose, string Email)
        {
            UserShema  objUserShema  = new UserShema();
            UserDataBL objUserDataBL = new UserDataBL();
            string     mudraresult   = string.Empty;
            int        result        = 0;
            SendSMS    objSendSMS    = new SendSMS();
            int        LangID        = 0;

            objUserShema.Name   = name;
            objUserShema.Mobile = mobile;
            //if (!string.IsNullOrEmpty(amount))
            //{
            //    objUserShema.Amount = Convert.ToDecimal(amount);
            //}
            //else
            //{
            //    objUserShema.Amount = 0;
            //}

            //objUserShema.Loantype = Convert.ToInt32(loantype);
            objUserShema.Email               = Email;
            objUserShema.Buspurpose          = Convert.ToInt32(BusinessPurpose);
            objUserShema.Applicant_SessionId = System.Web.HttpContext.Current.Session.SessionID;
            result = objUserDataBL.insertUserData(objUserShema);
            if (result == 1)
            {
                mudraresult = "success";
                if (objUserShema.Mobile.ToString() != "" || objUserShema.Mobile.ToString() != string.Empty)
                {
                    objSendSMS.SMSSend(objUserShema.Mobile, "", "welcome");
                }
                if (objUserShema.Email.ToString() != "" || objUserShema.Email.ToString() != string.Empty)
                {
                    SendEamil(objUserShema.Email.ToString());
                }
            }
            else
            {
                mudraresult = "Failed";
            }
            return(mudraresult);
        }
Exemplo n.º 6
0
 public int insertUserData(UserShema objUserShema)
 {
     try
     {
         using (SqlConnection objConn = SQLHelper.OpenConnection())
         {
             using (SqlTransaction objTran = objConn.BeginTransaction())
             {
                 var param = new SqlParameter[]
                 {
                     new SqlParameter("@Name", objUserShema.Name == null ? (object)DBNull.Value: objUserShema.Name),
                     new SqlParameter("@MobileNo", objUserShema.Mobile == null ? (object)DBNull.Value: objUserShema.Mobile),
                     //new SqlParameter("@LoanType",objUserShema.Loantype == 0 ? 0 : objUserShema.Loantype),
                     //new SqlParameter("@Amount",objUserShema.Amount == 0 ? 0 : objUserShema.Amount),
                     new SqlParameter("@EmailID", objUserShema.Email == null ? (object)DBNull.Value : objUserShema.Email),
                     new SqlParameter("@BusPurpose ", objUserShema.Buspurpose == 0 ? 0 : objUserShema.Buspurpose),
                     new SqlParameter("@Applicant_SessionId", objUserShema.Applicant_SessionId == null ? (object)DBNull.Value: objUserShema.Applicant_SessionId),
                 };
                 int result = SQLHelper.ExecuteNonQuery(objConn, objTran, CommandType.StoredProcedure, "sp_InsertUSerData", param);
                 if (result == 1)
                 {
                     objTran.Commit();
                     return(result);
                 }
                 else
                 {
                     objTran.Rollback();
                     return(0);
                 }
             }
         }
     }
     catch (Exception ee)
     {
         return(0);
     }
     finally
     {
     }
 }