public DataTable GetAllEvents() { DataTable dtVendorInfo = new DataTable(); SQLDAL objSql = new SQLDAL(); MySqlCommand objCmd = new MySqlCommand(); MySqlDataAdapter objda = new MySqlDataAdapter(); try { objCmd = objSql.CreateCommand(objCmd, CommandType.StoredProcedure, "View"); objSql.AddParameter(objCmd, "pAction", MySqlDbType.VarChar, ParameterDirection.Input, 20, "GetEvent"); objda.SelectCommand = objCmd; objda.Fill(dtVendorInfo); } catch (Exception ex) { } finally { if (!(objCmd == null)) { objCmd.Dispose(); if (objSql != null) { objSql.Dispose(); } if (objda != null) { objda.Dispose(); } } } return(dtVendorInfo); }
public string CreateEvent(int intEventId, int intUserId, string strEventName, string strStartDate, string strStartTime, string strEndDate, string strEndTime, string strDescription, string strEventType, string strVenueEventType, string strAddress, string strVenue, string strCity, string strState, string strCountry, string strPinCode, string strEventLogo, string strCoverPicture, string strFinalEventType, string strDraft, string strStatus, int intCreatedById) { string strRetVal = ""; SQLDAL objSql = new SQLDAL(); MySqlCommand objCmd = new MySqlCommand(); MySqlDataAdapter objda = new MySqlDataAdapter(); try { objCmd = objSql.CreateCommand(objCmd, CommandType.StoredProcedure, "EventsSp"); objSql.AddParameter(objCmd, "pAction", MySqlDbType.VarChar, ParameterDirection.Input, 50, "InsertEvent"); objSql.AddParameter(objCmd, "peventId", MySqlDbType.Int32, ParameterDirection.Input, 50, intEventId); objSql.AddParameter(objCmd, "puserId", MySqlDbType.Int32, ParameterDirection.Input, 50, intUserId); objSql.AddParameter(objCmd, "peventName", MySqlDbType.VarChar, ParameterDirection.Input, 50, strEventName); objSql.AddParameter(objCmd, "pstartDate", MySqlDbType.VarChar, ParameterDirection.Input, 50, strStartDate); objSql.AddParameter(objCmd, "pstartTime", MySqlDbType.VarChar, ParameterDirection.Input, 50, strStartTime); objSql.AddParameter(objCmd, "pendDate", MySqlDbType.VarChar, ParameterDirection.Input, 50, strEndDate); objSql.AddParameter(objCmd, "pendTime", MySqlDbType.VarChar, ParameterDirection.Input, 50, strEndTime); objSql.AddParameter(objCmd, "pdescription", MySqlDbType.VarChar, ParameterDirection.Input, 50, strDescription); objSql.AddParameter(objCmd, "peventType", MySqlDbType.VarChar, ParameterDirection.Input, 50, strEventType); objSql.AddParameter(objCmd, "pvenueEventType", MySqlDbType.VarChar, ParameterDirection.Input, 50, strVenueEventType); objSql.AddParameter(objCmd, "paddress", MySqlDbType.VarChar, ParameterDirection.Input, 50, strAddress); objSql.AddParameter(objCmd, "pvenue", MySqlDbType.VarChar, ParameterDirection.Input, 50, strVenue); objSql.AddParameter(objCmd, "pstate", MySqlDbType.VarChar, ParameterDirection.Input, 50, strCity); objSql.AddParameter(objCmd, "pcity", MySqlDbType.VarChar, ParameterDirection.Input, 50, strState); objSql.AddParameter(objCmd, "pcountry", MySqlDbType.VarChar, ParameterDirection.Input, 50, strCountry); objSql.AddParameter(objCmd, "ppinCode", MySqlDbType.VarChar, ParameterDirection.Input, 50, strPinCode); objSql.AddParameter(objCmd, "peventLogo", MySqlDbType.VarChar, ParameterDirection.Input, 50, strEventLogo); objSql.AddParameter(objCmd, "pcoverPic", MySqlDbType.VarChar, ParameterDirection.Input, 50, strCoverPicture); objSql.AddParameter(objCmd, "pfinaleventtype", MySqlDbType.VarChar, ParameterDirection.Input, 50, strFinalEventType); objSql.AddParameter(objCmd, "pdraft", MySqlDbType.VarChar, ParameterDirection.Input, 50, strDraft); objSql.AddParameter(objCmd, "pstatus", MySqlDbType.VarChar, ParameterDirection.Input, 50, strStatus); objSql.AddParameter(objCmd, "pCreatedBy", MySqlDbType.Int32, ParameterDirection.Input, 25, intCreatedById); strRetVal = objCmd.ExecuteScalar().ToString(); } catch (Exception ex) { throw ex; //CreateErrorlog.WriteError(ex.Message.ToString() + "\r\n" + ex.StackTrace); } finally { if (!(objCmd == null)) { objCmd.Dispose(); if (objSql != null) { objSql.Dispose(); } if (objda != null) { objda.Dispose(); } } } return(strRetVal); }
public String UpdMobileVerify(string strMobileno) { string strRetVal = ""; SQLDAL objSql = new SQLDAL(); MySqlCommand objCmd = new MySqlCommand(); MySqlDataAdapter objda = new MySqlDataAdapter(); try { objCmd = objSql.CreateCommand(objCmd, CommandType.StoredProcedure, "signupSp"); objSql.AddParameter(objCmd, "pAction", MySqlDbType.VarChar, ParameterDirection.Input, 50, "updmobileotp"); objSql.AddParameter(objCmd, "psignupId", MySqlDbType.Int32, ParameterDirection.Input, 50, null); objSql.AddParameter(objCmd, "pfullName", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "peMail", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pmobileNo", MySqlDbType.VarChar, ParameterDirection.Input, 50, strMobileno); objSql.AddParameter(objCmd, "ppwd", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "pcpwd", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pmobileOtp", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "pemailOtp", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pcreatedBy", MySqlDbType.Int32, ParameterDirection.Input, 25, null); strRetVal = objCmd.ExecuteScalar().ToString(); } catch (Exception ex) { //CreateErrorlog.WriteError(ex.Message.ToString() + "\r\n" + ex.StackTrace); } finally { if (!(objCmd == null)) { objCmd.Dispose(); if (objSql != null) { objSql.Dispose(); } if (objda != null) { objda.Dispose(); } } } return(strRetVal); }
public DataTable DtGetAllSignUp() { DataTable dtVendorInfo = new DataTable(); SQLDAL objSql = new SQLDAL(); MySqlCommand objCmd = new MySqlCommand(); MySqlDataAdapter objda = new MySqlDataAdapter(); try { objCmd = objSql.CreateCommand(objCmd, CommandType.StoredProcedure, "signupSp"); objSql.AddParameter(objCmd, "pAction", MySqlDbType.VarChar, ParameterDirection.Input, 20, "selectverifiedsignin"); objSql.AddParameter(objCmd, "psignupId", MySqlDbType.Int32, ParameterDirection.Input, 50, null); objSql.AddParameter(objCmd, "pfullName", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "peMail", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pmobileNo", MySqlDbType.VarChar, ParameterDirection.Input, 50, null); objSql.AddParameter(objCmd, "ppwd", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "pcpwd", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pmobileOtp", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "pemailOtp", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pcreatedBy", MySqlDbType.Int32, ParameterDirection.Input, 25, null); objda.SelectCommand = objCmd; objda.Fill(dtVendorInfo); } catch (Exception ex) { } finally { if (!(objCmd == null)) { objCmd.Dispose(); if (objSql != null) { objSql.Dispose(); } if (objda != null) { objda.Dispose(); } } } return(dtVendorInfo); }
public List <SignUp> ListAllSignUp() { List <SignUp> lst = new List <SignUp>(); DataTable dt = new DataTable(); SQLDAL objSql = new SQLDAL(); MySqlCommand objCmd = new MySqlCommand(); MySqlDataAdapter objda = new MySqlDataAdapter(); try { conn.Open(); objCmd = objSql.CreateCommand(objCmd, CommandType.StoredProcedure, "signupSp"); objSql.AddParameter(objCmd, "pAction", MySqlDbType.VarChar, ParameterDirection.Input, 50, "selectsignin"); objSql.AddParameter(objCmd, "psignupId", MySqlDbType.Int32, ParameterDirection.Input, 50, null); objSql.AddParameter(objCmd, "pfullName", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "peMail", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pmobileNo", MySqlDbType.VarChar, ParameterDirection.Input, 50, null); objSql.AddParameter(objCmd, "ppwd", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "pcpwd", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pmobileOtp", MySqlDbType.VarChar, ParameterDirection.Input, 200, null); objSql.AddParameter(objCmd, "pemailOtp", MySqlDbType.VarChar, ParameterDirection.Input, 25, null); objSql.AddParameter(objCmd, "pcreatedBy", MySqlDbType.Int32, ParameterDirection.Input, 25, null); objda.SelectCommand = objCmd; objda.Fill(dt); foreach (DataRow dr in dt.Rows) { lst.Add(new SignUp { SignUpUserId = Convert.ToInt32(dr["signupUserId"]), fullName = Convert.ToString(dr["fullName"]), email = Convert.ToString(dr["eMail"]), mobileNo = Convert.ToString(dr["mobileNo"]), pwd = Convert.ToString(dr["pwd"]), cpwd = Convert.ToString(dr["cpwd"]), mobileOtp = Convert.ToString(dr["mobileOtp"]), emailOtp = Convert.ToString(dr["emailOtp"]), mobileverify = Convert.ToString(dr["mobileVerify"]), emailverify = Convert.ToString(dr["emailVerify"]) }); } } catch (Exception ex) { return(lst); } finally { if (!(objCmd == null)) { objCmd.Dispose(); if (objSql != null) { objSql.Dispose(); } if (objda != null) { objda.Dispose(); } } } return(lst); }