public ResCommon DeleteUserHsn(ReqUserHsn reqUserHsn) { ResCommon resCommon = new ResCommon(); return(DBCall.DeleteUserHsn(reqUserHsn, ExtensionMethods.GetStoreProcHsnOrHsv(reqUserHsn.HsnOrHsc, StaticConst.SPDELETEUSERHSNCODE, StaticConst.SPDELETEUSERHSCCODE))); //return Common<ReqUserHsn, ResCommon>.Serialize_Deserialize(reqUserHsn, resCommon, ExtensionMethods.GetStoreProcHsnOrHsv(reqUserHsn.HsnOrHsc, StaticConst.SPDELETEUSERHSNCODE, StaticConst.SPDELETEUSERHSCCODE)); }
public static ResCommon SendMailCustom(ReqEmail reqEmail, string Password = null) { ResCommon resCommon = new ResCommon(); try { EASendMail.SmtpMail oMail = new SmtpMail("TryIt"); EASendMail.SmtpClient oSmtp = new EASendMail.SmtpClient(); // Set sender email address, please change it to yours oMail.From = StaticConst.EMAILID; // Set recipient email address, please change it to yours oMail.To = reqEmail.EmailId; oMail.From = new EASendMail.MailAddress(reqEmail.UserName, StaticConst.EMAILID); // Set email subject oMail.Subject = reqEmail.EmailSubject; string path = AppDomain.CurrentDomain.BaseDirectory + "\\Optimize\\EmailHtml\\"; StreamReader strReader = new StreamReader(path + reqEmail.HtmlType + ".html"); string objReader = strReader.ReadToEnd(); objReader = objReader.Replace("{{Username}}", reqEmail.UserName); objReader = objReader.Replace("{{EmailBody}}", reqEmail.EmailBody); if (reqEmail.HtmlType.Contains("Password")) { objReader.Replace("{{ Password}}", Password); } oMail.HtmlBody = objReader; if (!String.IsNullOrEmpty(reqEmail.EmailAttachmentUrl)) { oMail.AddAttachment(reqEmail.EmailAttachmentUrl); } // Your SMTP server address SmtpServer oServer = new SmtpServer(StaticConst.SERVERNAME); // User and password for ESMTP authentication, if your server doesn't require // User authentication, please remove the following codes. oServer.User = StaticConst.EMAILID; oServer.Password = StaticConst.EMAILPASSWORD; oSmtp.SendMail(oServer, oMail); resCommon.ResponseCode = 0; resCommon.ResponseMessage = "Email Sent Successfully"; return(resCommon); } catch (Exception ex) { resCommon.ResponseCode = 1; resCommon.ResponseMessage = "Error while sending Email"; return(resCommon); } }
public static ResCommon InsertBrsPayment(ReqBrsPaymentList reqBrsPayment, string spName) { ResCommon resCommon = new ResCommon(); DataTable dt = new DataTable(); try { using (SqlConnection con = new SqlConnection(StaticConst.connectionString)) { using (SqlCommand cmd = new SqlCommand(spName, con)) { string json = JsonConvert.SerializeObject(reqBrsPayment); JObject jObject = JObject.Parse(json); var jarray = Convert.ToString(jObject["reqBrsPaymentList"]); DataTable dtReqBrsPaymentList = (DataTable)JsonConvert.DeserializeObject(jarray, (typeof(DataTable))); dtReqBrsPaymentList.Columns.Remove("Type"); dtReqBrsPaymentList.Columns.Remove("ResponseMessage"); dtReqBrsPaymentList.Columns.Remove("ResponseCode"); cmd.CommandType = System.Data.CommandType.StoredProcedure; con.Open(); cmd.Parameters.Add(new SqlParameter("@BrsPaymentType", dtReqBrsPaymentList)); cmd.Parameters.Add(new SqlParameter("@Type", reqBrsPayment.Type)); using (SqlDataAdapter da = new SqlDataAdapter(cmd)) { da.Fill(dt); if (dt.Rows.Count > 0) { resCommon.ResponseCode = 0; resCommon.ResponseMessage = reqBrsPayment.Type + " Inserted Successfully"; } else { resCommon.ResponseCode = 0; resCommon.ResponseMessage = "No Records Found"; } } } } } catch (Exception ex) { } return(resCommon); }
public ResCommon DeleteInvoice(ReqId reqId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqId, resCommon, StaticConst.SPDELETEINVOICE)); }
public ResCommon DeleteEstimate(ReqId reqId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqId, resCommon, StaticConst.SPDELETEESTIMATE)); }
public ResCommon DeleteDebit(ReqId reqId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqId, resCommon, StaticConst.SPDELETEDEBIT)); }
public ResCommon DeleteAdvance(ReqId reqId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqId, resCommon, StaticConst.SPDELETEADVANCE)); }
public ResCommon InsertProfile(ReqProfile reqProfile) { ResCommon resCommon = new ResCommon(); return(Common <ReqProfile, ResCommon> .Serialize_Deserialize(reqProfile, resCommon, StaticConst.SP_INSERTPROFILE)); }
public ResCommon UpdatePassword(ReqUpdatePassword reqUpdatePassword) { ResCommon resCommon = new ResCommon(); return(Common <ReqUpdatePassword, ResCommon> .Serialize_Deserialize(reqUpdatePassword, resCommon, StaticConst.SP_UPDATEPASSWORD)); }
public ResCommon DeleteVendor(ReqId reqVendorId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqVendorId, resCommon, StaticConst.SPDELETEVENDOR)); }
public ResCommon UpdateVendor(ReqVendorUpdate reqVendorUpdate) { ResCommon resCommon = new ResCommon(); return(Common <ReqVendorUpdate, ResCommon> .Serialize_Deserialize(reqVendorUpdate, resCommon, StaticConst.SPUPDATEVENDOR)); }
public ResCommon InsertUserHSNCode(ReqInsertUserHsn reqInsertUserHsn) { ResCommon resCommon = new ResCommon(); return(DBCall.InsertUserHSNCode(reqInsertUserHsn, ExtensionMethods.GetStoreProcHsnOrHsv(reqInsertUserHsn.HsnOrHsc, StaticConst.SPINSERTUSERHSNCODE, StaticConst.SPINSERTUSERHSCCODE))); }
public ResCommon UpdateUser(ReqUpdateUser reqUpdateUser) { ResCommon resCommon = new ResCommon(); return(Common <ReqUpdateUser, ResCommon> .Serialize_Deserialize(reqUpdateUser, resCommon, StaticConst.SPUPDATEUSER)); }
public ResCommon DeleteUser(ReqUserId reqUserId) { ResCommon resCommon = new ResCommon(); return(Common <ReqUserId, ResCommon> .Serialize_Deserialize(reqUserId, resCommon, StaticConst.SPDELETEUSER)); }
public ResCommon DeleteCustomer(ReqId reqCustomerId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqCustomerId, resCommon, StaticConst.SPDELETECUSTOMER)); }
public ResCommon UpdateLogo(ReqUpdateLogo reqUpdateLogo) { ResCommon resCommon = new ResCommon(); return(Common <ReqUpdateLogo, ResCommon> .Serialize_Deserialize(reqUpdateLogo, resCommon, StaticConst.SPUPDATELOGO)); }
public ResCommon DeletePurchase(ReqId reqId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqId, resCommon, StaticConst.SPDELETEPURCHASE)); }
public ResCommon ValidateOtp(ReqOtpValidate reqValidateOtp) { ResCommon resCommon = new ResCommon(); return(Common <ReqOtpValidate, ResCommon> .Serialize_Deserialize(reqValidateOtp, resCommon, StaticConst.SP_VALIDATEOTP)); }
public ResCommon DeleteBill(ReqId reqBillId) { ResCommon resCommon = new ResCommon(); return(Common <ReqId, ResCommon> .Serialize_Deserialize(reqBillId, resCommon, StaticConst.SPDELETEBILL)); }
public ResCommon UpdateProfile(ReqProfile reqProfile) { ResCommon resCommon = new ResCommon(); return(Common <ReqProfile, ResCommon> .Serialize_Deserialize(reqProfile, resCommon, StaticConst.SP_UPDATEPROFILE)); }
public ResCommon InsertBillPayment(ReqBillPayment resBillPayment) { ResCommon resCommon = new ResCommon(); return(Common <ReqBillPayment, ResCommon> .Serialize_Deserialize(resBillPayment, resCommon, StaticConst.SPINSERTBILLPAYMENT)); }