protected void btnSubmit_OnClick(object sender, EventArgs e) { string userPassword = string.Empty; string userEmail = string.Empty; MembershipUser user = Membership.GetUser(txtUserName.Text); try { //lblPassword.Text = Membership.Provider.GetPassword(txtUserName.Text, txtAnswer.Text); userPassword = Membership.Provider.GetPassword(txtUserName.Text, txtAnswer.Text); userEmail = user.Email.ToString(); lblPassword.Text = userEmail.ToString(); string body = ""; body += "<h2>AbiMatu Password Recovery</h2>"; body += "User Name :<b>" + txtUserName.Text + "</b><br/>"; body += "Password : <b>" + userPassword + "</b><br/>"; Sendmail.sendEmail("*****@*****.**", "", userEmail.ToString(), "", "Password From AbiMatu", body, "*****@*****.**", "mavs123456"); panForgetPassword.Visible = false; panPassword.Visible = true; panError.Visible = false; } catch (Exception ex) { lblError.Text = ex.Message; panError.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["Notification"] != null) { lblmsg.Text = "Notification"; } if (Request.QueryString["orderSuccessfull"] != null || Request.QueryString["ID"] != null) { lblmsg.Text = "Your order is successfull"; Login paidUser = LoginManager.GetLoginByID(int.Parse(Request.QueryString["ID"])); try { string body = "A subscriber have paid " + paidUser.ExtraField10 + @", <br/>Name:" + paidUser.FirstName + " " + paidUser.LastName + @",<br/> email: " + paidUser.Email + @" and contact:" + paidUser.CellPhone + @""; Sendmail.sendEmail("*****@*****.**", "Caregivermax: Payment", "*****@*****.**", "*****@*****.**", "Caregivermax: Payment", body); body = "Thank you for your subscription. Once the payment is cleared, a technical support from Care Giver Max will call you and setup your business. Again, we appreciate your business and look forward to work with you."; Sendmail.sendEmail("*****@*****.**", "Caregivermax: Payment", paidUser.Email, "*****@*****.**", "Caregivermax: Payment", body); } catch (Exception ex) { } } if (Request.QueryString["orderCencel"] != null) { lblmsg.Text = "Your have cancelled the order"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string sql = @" SELECT Mem_Member.Name,Mem_Member.Mobile,Mem_Member.Email,Conv_Registration.Conv_RegistrationID FROM Conv_Registration INNER JOIN Mem_Member ON Conv_Registration.Mem_MemberID =Mem_Member.Mem_MemberID where Conv_Registration.TrxID<>'' "; DataSet ds = DatabaseManager.ExecSQL(sql); //bool isStart = false; foreach (DataRow dr in ds.Tables[0].Rows) { //SMS /* * if (dr["Mobile"].ToString().Trim() != "") * { * try * { * string SMS = "Thanks for bKash payment to IEB. Your registration for Convention 55 is Confirmed.Please print your registration form (or money receipt) and bring it in Convention. www.iebbd.org/print.aspx?id=" + dr["Conv_RegistrationID"].ToString(); * MyWebRequest myRequest = new MyWebRequest("https://cbsms.grameenphone.com/send_sms_api/send_sms_from_api.php?user_name=IEBadmin&password=IEBadmin123&subscriber_no=" + dr["Mobile"].ToString().Trim().Substring(1, 10) + "&mask=IEB&sms=" + SMS); * //MyWebRequest myRequest = new MyWebRequest("https://cbsms.grameenphone.com/send_sms_api/send_sms_from_api.php?user_name=IEBadmin&password=IEBadmin123&subscriber_no=1818619647&mask=IEB&sms=" + SMS); * XmlDocument doc = new XmlDocument(); * * doc.LoadXml(myRequest.GetResponse()); * } * catch (Exception ex) * { } * * } */ //Mail if (dr["Email"].ToString().Trim() != "") { try { //string mialMessage = "Dear " + dr["Name"].ToString() + ",<br/><br/>Thanks for bKash payment.Your registration for Convention 55 is Confirmed.<br/><a href='www.iebbd.org/print.aspx?id=" +dr["Conv_RegistrationID"].ToString() + "'>Click here to print your registration form(or money receipt) which you need to bring in Convention</a><hr/>This is system generated payment confirmation mail.<hr/>With regards<br/>IT Section, IEB<br/>01766674142"; Sendmail.sendEmail(dr["Email"].ToString().Trim(), "[Correction] IEB 55th Convention Registration form(i.e. Money receipt)", MoneyReceiptGeneration.ConventionConfirmation(int.Parse(dr["Conv_RegistrationID"].ToString()))); } catch (Exception ex) { } } } } }
protected void btnConfirm_Click(object sender, EventArgs e) { if (txtSerialNo.Text.Trim() == "") { showAlartMessage("PLease enter the serial no"); return; } sqlInjectionChecking(); trConfirmation.Visible = true; btnConfirm.Visible = false; string html = @" <div style='border:1px solid black;background-color:#FDFBE6;font-family:Arial;font-size:12px;padding:10px;width:408px;'> <table border='0' cellspacing='0' cellpadding='2' > <tr> <td colspan='5' style='background-color:white;'> <img src='http://iebbd.org/images/Convention/55/formHeader.png' width='400px'/> </td> </tr> <tr> <td style='border:1px solid black;'>Engr.</td> <td colspan='4' style='border:1px solid black;'>" + lblName.Text.Replace("ENGR. ", "") + @"</td> </tr> <tr> <td style='border:1px solid black;'>Membership No.</td> <td colspan='4' style='border:1px solid black;'>" + lblMembershipNo.Text + @"</td> </tr> <tr> <td style='border:1px solid black;'>Center</td> <td colspan='4' style='border:1px solid black;'>" + lblCenter.Text + @"</td> </tr> <tr> <td style='border:1px solid black;'>Telephone No.</td> <td colspan='4' style='border:1px solid black;'>" + txtTelephoneNo.Text + @" </td> </tr> <tr> <td style='border:1px solid black;'>Mobile</td> <td colspan='4' style='border:1px solid black;'>" + txtMobileN0.Text + @" </td> </tr> <tr> <td style='border:1px solid black;'>Email Address</td> <td colspan='4' style='border:1px solid black;'>" + txtEmail.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;'>Registration</td> <td style='border:1px solid black;background-color:#FFD24A;'>Compulsory</td> <td style='border:1px solid black;text-align:right;' colspan='3'>Tk. 1000</td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;' rowspan='3'>Lunch</td> <td style='border:1px solid black;background-color:#FFD24A;'>03 May'14</td> <td style='border:1px solid black;text-align:center;'>" + txtQty1.Text + @" </td> <td style='border:1px solid black;width:70px;'><b style='color: #FF0000;'>x</b> Tk. 130=</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount1.Text + @" </td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>04 May'14</td> <td style='border:1px solid black;' colspan='3'>Lunch Will be provided by IEB</td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>05 May'14</td> <td style='border:1px solid black;text-align:center;'>" + txtQty2.Text + @" </td> <td style='border:1px solid black;'><b style='color: #FF0000;'>x</b> Tk. 130 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount2.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;' rowspan='2'><b style='color: #FF0000;'>*</b>Dinner</td> <td style='border:1px solid black;background-color:#FFD24A;'>Single</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox1.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + @"</td> <td style='border:1px solid black;'>Tk. 500 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount3.Text + @" </td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>Couple</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox2.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + @"</td> <td style='border:1px solid black;'>Tk. 800 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount4.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'><b style='color: #FF0000;'>*</b>Only for Members & Spouse</td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;' rowspan='2'>Optional Items</td> <td style='border:1px solid black;background-color:#FFD24A;'>Ladies Bag</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox3.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + txtQty3.Text + @"</td> <td style='border:1px solid black;'>Tk. 1200 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount5.Text + @" </td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>IEB Tie</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox4.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + txtQty4.Text + @"</td> <td style='border:1px solid black;'>Tk. 500 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount6.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black; text-align:right;' colspan='4'>Total Payable(to IEB) =</td> <td style='border:1px solid black;' text-align:right;>" + lblTotal.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black; text-align:left;' colspan='3'>Serial No</td> <td style='border:1px solid black;' colspan='2'>'" + txtSerialNo.Text + @"'</td> </tr> </table> </div> "; string htmlConfirmation = @" <div style='border:1px solid black;background-color:#FDFBE6;font-family:Arial;font-size:12px;padding:10px;width:408px;'> <table border='0' cellspacing='0' cellpadding='2' > <tr> <td colspan='5' style='background-color:white;'> <img src='http://iebbd.org/images/Convention/55/formHeader.png' width='400px'/> <br/>Money Receipt </td> </tr> <tr> <td style='border:1px solid black;'>Engr.</td> <td colspan='4' style='border:1px solid black;'>" + lblName.Text.Replace("ENGR. ", "") + @"</td> </tr> <tr> <td style='border:1px solid black;'>Membership No.</td> <td colspan='4' style='border:1px solid black;'>" + lblMembershipNo.Text + @"</td> </tr> <tr> <td style='border:1px solid black;'>Center</td> <td colspan='4' style='border:1px solid black;'>" + lblCenter.Text + @"</td> </tr> <tr> <td style='border:1px solid black;'>Telephone No.</td> <td colspan='4' style='border:1px solid black;'>" + txtTelephoneNo.Text + @" </td> </tr> <tr> <td style='border:1px solid black;'>Mobile</td> <td colspan='4' style='border:1px solid black;'>" + txtMobileN0.Text + @" </td> </tr> <tr> <td style='border:1px solid black;'>Email Address</td> <td colspan='4' style='border:1px solid black;'>" + txtEmail.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;'>Registration</td> <td style='border:1px solid black;background-color:#FFD24A;'>Compulsory</td> <td style='border:1px solid black;text-align:right;' colspan='3'>Tk. 1000</td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;' rowspan='3'>Lunch</td> <td style='border:1px solid black;background-color:#FFD24A;'>03 May'14</td> <td style='border:1px solid black;text-align:center;'>" + txtQty1.Text + @" </td> <td style='border:1px solid black;width:70px;'><b style='color: #FF0000;'>x</b> Tk. 130=</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount1.Text + @" </td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>04 May'14</td> <td style='border:1px solid black;' colspan='3'>Lunch Will be provided by IEB</td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>05 May'14</td> <td style='border:1px solid black;text-align:center;'>" + txtQty2.Text + @" </td> <td style='border:1px solid black;'><b style='color: #FF0000;'>x</b> Tk. 130 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount2.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;' rowspan='2'><b style='color: #FF0000;'>*</b>Dinner</td> <td style='border:1px solid black;background-color:#FFD24A;'>Single</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox1.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + @"</td> <td style='border:1px solid black;'>Tk. 500 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount3.Text + @" </td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>Couple</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox2.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + @"</td> <td style='border:1px solid black;'>Tk. 800 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount4.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'><b style='color: #FF0000;'>*</b>Only for Members & Spouse</td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black;' rowspan='2'>Optional Items</td> <td style='border:1px solid black;background-color:#FFD24A;'>Ladies Bag</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox3.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + @"</td> <td style='border:1px solid black;'>Tk. 1200 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount5.Text + @" </td> </tr> <tr> <td style='border:1px solid black;background-color:#FFD24A;'>IEB Tie</td> <td style='border:1px solid black;text-align:center;'> " + (CheckBox4.Checked ? "<img src='http://iebbd.org/images/Convention/check_mark.png' alt='tick_Mark'/>" : "") + @"</td> <td style='border:1px solid black;'>Tk. 500 =</td> <td style='border:1px solid black;text-align:right;'>" + txtAmount6.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black; text-align:right;' colspan='4'>Total Payable(to IEB) =</td> <td style='border:1px solid black;' text-align:right;>" + lblTotal.Text + @" </td> </tr> <tr> <td colspan='5' style='height:10px;'> </td> </tr> <tr> <td style='border:1px solid black; text-align:left;' colspan='3'>Serial No</td> <td style='border:1px solid black;' colspan='2'>'" + txtSerialNo.Text + @"'</td> </tr> <tr> <td style='border:1px solid black; text-align:left;' colspan='5'>Thanks for your payment through bKash. Your registration is confirmed. </td> </tr> </table> </div> "; if (tblFessDetails.Visible) { html += "<div style='color:red;padding:10px; border:1px solid red;'>" + lblDues.Text + "</div>"; } if (txtEmail.Text != "") { try { //Sendmail.sendEmail(txtEmail.Text, "55th Convention Registration", html); //lblConfirmationEmail.Text = @"<br/><ul style='padding-left:15px;color:black;'><li>The Receipt has sent to your email <b style='color:blue;'>" + txtEmail.Text + "</b>"; } catch (Exception ex) { } } /* * if (txtMobileN0.Text.Trim().Length == 11) * { * try * { * * MyWebRequest myRequest1 = new MyWebRequest("https://cbsms.grameenphone.com/send_sms_api/send_sms_from_api.php?user_name=IEBadmin&password=IEBadmin123&subscriber_no=" + txtMobileN0.Text.Substring(1, 10) + "&mask=IEB&sms=You have to Pay your IEB Convention Fee from (any)personal bKash Account."); * XmlDocument doc1 = new XmlDocument(); * * string successMessage1 = ""; * doc1.LoadXml(myRequest1.GetResponse()); * XmlNodeList nodesUrl1 = doc1.SelectNodes("response"); * if (!doc1.InnerText.ToString().Contains("Failed")) * { * // lblConfirmationEmail.Text += " and a SMS to <b style='color:blue;'>" + txtMobileN0.Text + "</b>"; * } * * MyWebRequest myRequest = new MyWebRequest("https://cbsms.grameenphone.com/send_sms_api/send_sms_from_api.php?user_name=IEBadmin&password=IEBadmin123&subscriber_no=" + txtMobileN0.Text.Substring(1, 10) + "&mask=IEB&sms=You IEB 55th Convention total payable fees :tk." + lbltotalPayable.Text + " [Merchant Acc. No.:01766674142][Reference No.: " + lblBillNo.Text + "][Counter:0]"); * XmlDocument doc = new XmlDocument(); * * string successMessage = ""; * doc.LoadXml(myRequest.GetResponse()); * XmlNodeList nodesUrl = doc.SelectNodes("response"); * if (!doc.InnerText.ToString().Contains("Failed")) * { * lblConfirmationEmail.Text += " and a SMS to <b style='color:blue;'>" + txtMobileN0.Text + "</b>"; * } * * * } * catch (Exception ex) * { * * } * } * */ lblConfirmationEmail.Text += ""; try { string sql = @" INSERT INTO [Conv_Registration_Offline] ([Conv_ConventionID] ,[Mem_MemberID] ,[RegistrationFee] ,[Lunch1No] ,[Lunch1Amount] ,[Lunch2No] ,[Lunch2Amount] ,[Dinner1] ,[Dinner2] ,[LadiesBag] ,[IEBTie] ,[TotalIEBFee] ,[bKashFees] ,[TotalPayable] ,[TrxID] ,[AddedDate] ,[TypeID] ,[StatusID] ,[ExtraField1] ,[ExtraField2] ,[ExtraField3] ,[ExtraField4] ,[ExtraField5]) VALUES (55--<Conv_ConventionID, int,> ," + (hfMem_MemberID.Value == ""?"0":hfMem_MemberID.Value) + @"--<Mem_MemberID, int,> ,1000--<RegistrationFee, int,> ," + (txtQty1.Text.Trim() == "" ? "0" : txtQty1.Text) + @"--<Lunch1No, int,> ," + (txtAmount1.Text.Trim() == "" ? "0" : txtAmount1.Text) + @"--<Lunch1Amount, int,> ," + (txtQty2.Text.Trim() == "" ? "0" : txtQty2.Text) + @"--<Lunch2No, int,> ," + (txtAmount2.Text.Trim() == "" ? "0" : txtAmount2.Text) + @"--<Lunch2Amount, int,> ," + (txtAmount3.Text.Trim() == "" ? "0" : txtAmount3.Text) + @"--<Dinner1, int,> ," + (txtAmount4.Text.Trim() == "" ? "0" : txtAmount4.Text) + @"--<Dinner2, int,> ," + (txtAmount5.Text.Trim() == "" ? "0" : txtAmount5.Text) + @"--<LadiesBag, int,> ," + (txtAmount6.Text.Trim() == "" ? "0" : txtAmount6.Text) + @"--<IEBTie, int,> ," + (lblTotal.Text.Trim() == "" ? "0" : lblTotal.Text) + @"--<TotalIEBFee, int,> ," + (lblbKashFee.Text.Trim() == "" ? "0" : lblbKashFee.Text) + @"--<bKashFees, int,> ," + (lbltotalPayable.Text.Trim() == "" ? "0" : lbltotalPayable.Text.Trim()) + @"--<TotalPayable, int,> ,'" + txtSerialNo.Text + @"'--<TrxID, nvarchar(256),> ,GETDATE()--<AddedDate, datetime,> ,1--<TypeID, int,> ,1--<StatusID, int,> ,'" + html.Replace("'", "''") + @"'--<ExtraField1, nvarchar(max),> ,'" + htmlConfirmation.Replace("'", "''") + @"'--<ExtraField2, nvarchar(max),> ,''--<ExtraField3, nvarchar(max),> ,''--<ExtraField4, nvarchar(max),> ,''--<ExtraField5, nvarchar(max),> ); Select SCOPE_IDENTITY(); "; DataSet ds = DatabaseManager.ExecSQL(sql); //lblPrint.Text = html; //div_Print.Visible = false; //tblCard.Visible = false; //tblInfo.Visible = false; //tblMembershipNo.Visible = false; trConfirmation.Visible = true; //PrintSalesInvoice(); a_print.HRef = "../MembersArea/ConventionPaymentOfflinePrint.aspx?Conv_RegistrationID=710307" + ds.Tables[0].Rows[0][0].ToString() + "034438"; tr_ConfirmationEmail.Visible = true; //Response.Redirect("ConventionPayment.aspx"); } catch (Exception ex) { Sendmail.sendEmail("*****@*****.**", "55th Convention Registration[Error]" + txtMemeberShipNoSearch.Text, ex.Message); Response.Redirect("../Page/CustomErrorPage.aspx"); } }
protected void btnSaveInDBForMembershipFee_Click(object sender, EventArgs e) { string sql = ""; foreach (GridViewRow gvr in gvbKash.Rows) { try { TextBox txtCorrctReferenceNo = (TextBox)gvr.FindControl("txtCorrctReferenceNo"); TextBox txtMemberShipNo = (TextBox)gvr.FindControl("txtMemberShipNo"); Label lblTransactionID = (Label)gvr.FindControl("lblTransactionID"); Label lblAmount = (Label)gvr.FindControl("lblAmount"); Label lblTrancsactionTime = (Label)gvr.FindControl("lblTrancsactionTime"); Label lblMobile = (Label)gvr.FindControl("lblMobile"); Label lblEmail = (Label)gvr.FindControl("lblEmail"); CheckBox chkSelect = (CheckBox)gvr.FindControl("chkSelect"); DropDownList rbtnPaidUpto = (DropDownList)gvr.FindControl("rbtnPaidUpto"); if (chkSelect.Checked) { sql = @" INSERT INTO [Mem_Fees] ([Mem_MemberID] ,[Amount] ,[PaidFor] ,[ExtraField] ,[AddedDate] ,[AddedBy] ,[ModifiedBy] ,[ModifiedDate] ,[Comn_RowStatusID] ,[RefferenceNo] ,[Comn_PaymentByID] ,[PaidDate] ,[Mem_FeesYearID]) VALUES ((Select Mem_MemberID from Mem_Member where MemberShipNo ='" + txtMemberShipNo.Text + @"')--<Mem_MemberID, int,> ," + lblAmount.Text + @"--<Amount, decimal(10,2),> ,'" + rbtnPaidUpto.SelectedItem.Text + @"'--<PaidFor, nvarchar(50),> ,'New Database Entry'--<ExtraField, nvarchar(256),> ,GETDATE()--<AddedDate, datetime,> ,1--<AddedBy, int,> ,1--<ModifiedBy, int,> ,GETDATE()--<ModifiedDate, datetime,> ,1--<Comn_RowStatusID, int,> ,'" + lblTransactionID.Text + @"'--<RefferenceNo, nvarchar(50),> ,2--<Comn_PaymentByID, int,> ,'" + DateTime.Parse(lblTrancsactionTime.Text).ToString("yyyy-MM-dd hh:mm tt") + @"'--<PaidDate, datetime,> ," + rbtnPaidUpto.SelectedValue + @"--<Mem_FeesYearID, int,> ); update Acc_bKash_Final set ExtraField1=(Select cast(Mem_MemberID as nvarchar) from Mem_Member where MemberShipNo ='" + txtMemberShipNo.Text + @"') where TransactionID=" + lblTransactionID.Text + @" "; DatabaseManager.ExecSQL(sql); //SMS if (lblMobile.Text.Trim() != "") { try { string SMS = "Thanks for bKash payment of your IEB membership fees paid upto " + rbtnPaidUpto.SelectedItem.Text + ". Your payment amount(" + lblAmount.Text + ") and trxID: " + lblTransactionID.Text; MyWebRequest myRequest = new MyWebRequest("http://cbsms.grameenphone.com/send_sms_api/send_sms_from_api.php?user_name=IEBadmin&password=IEBadmin123&subscriber_no=" + lblMobile.Text.Trim().Substring(1, 10) + "&mask=IEB&sms=" + SMS); XmlDocument doc = new XmlDocument(); doc.LoadXml(myRequest.GetResponse()); } catch (Exception ex) { } } //Mail if (lblEmail.Text.Trim() != "") { try { string mialMessage = "Dear Engr,<br/><br/>Thanks for bKash payment of your membership fees paid upto " + rbtnPaidUpto.SelectedItem.Text + ". Your payment amount(" + lblAmount.Text + ") & trxID: " + lblTransactionID.Text + "<br/>This is system generated payment confirmation mail.<hr/>With regards<br/>IT Section, IEB<br/>01766674142"; Sendmail.sendEmail(lblEmail.Text, "IEB Membership Fees payment confirmation", mialMessage); } catch (Exception ex) { } } } } catch (Exception ex) {} } btnSearch_Click(this, new EventArgs()); }
protected void btnAdd_Click(object sender, EventArgs e) { string loginID = "1"; txtLoginName.Text = txtEmail.Text; Login login = new Login(); if (LoginManager.GetLoginByLoginName(txtLoginName.Text) != null) { lblMsg.Text = "Login Name dulplicate<br/>"; lblMsg.ForeColor = System.Drawing.Color.Red; return; } login.LoginName = txtLoginName.Text; if (txtPassword.Text != txtPasswordConfirm.Text) { lblMsg.Text = "Password and Confrim Password Does not match<br/>"; lblMsg.ForeColor = System.Drawing.Color.Red; return; } login.Password = txtPassword.Text; login.Email = txtEmail.Text; login.FirstName = txtFirstName.Text; login.MiddleName = txtMiddleName.Text; login.LastName = txtLastName.Text; login.CellPhone = txtCellPhone.Text; login.HomePhone = txtHomePhone.Text; login.WorkPhone = txtWorkPhone.Text; login.RowStatusID = 2; login.AddedBy = loginID; login.AddedDate = DateTime.Now; login.UpdatedBy = loginID; login.UpdatedDate = DateTime.Now; login.Details = txtDetails.Text; login.ExtraField1 = ""; login.ExtraField2 = "Resident/AdminResidentDisplay.aspx"; login.ExtraField3 = ""; login.ExtraField4 = txtInitial.Text; login.ExtraField5 = ""; login.ExtraField6 = ""; login.ExtraField7 = ""; login.ExtraField8 = ""; login.ExtraField9 = ""; login.ExtraField10 = ""; int resutl = LoginManager.InsertLogin(login); //add as office admin string sql = @"INSERT INTO [Login_LoginRole] ([RoleID] ,[LoginID] ,[RowStatusID] ,[AddedDate] ,[AddedBy] ,[ModifyDate] ,[ModifyBy]) VALUES (6--<RoleID, int,> ," + resutl + @"--<LoginID, int,> ,1--<RowStatusID, int,> ,GETDATE()--<AddedDate, datetime,> ,'1'--<AddedBy, nvarchar(256),> ,GETDATE()--<ModifyDate, datetime,> ,'1'--<ModifyBy, nvarchar(256),> ); update Login_Login set AddedResident=0, RootUser="******" where LoginID=" + resutl; CommonManager.SQLExec(sql); lblMsg.Text = "Added Successfully<br/>"; lblMsg.ForeColor = System.Drawing.Color.Green; //Response.Redirect("AdminLoginDisplay.aspx"); Sendmail.sendEmail(txtEmail.Text, txtFirstName.Text + " " + txtLastName.Text, "*****@*****.**", "*****@*****.**", "New user registered", "A new user registered for Care Giver Solution."); Sendmail.sendEmail("*****@*****.**", "Care Giver Max", txtEmail.Text, "*****@*****.**", "Signup at www.caregivermax.com", "Thank you for your interest and signing up with Care Giver max. We look forward to work with you"); Response.Redirect("m_registration-step2.aspx?LoginID=" + resutl); }