protected void btnAdd_Click(object sender, EventArgs e) { Conv_Registration conv_Registration = new Conv_Registration(); conv_Registration.Conv_ConventionID = Int32.Parse(txtConv_ConventionID.Text); conv_Registration.Mem_MemberID = Int32.Parse(txtMem_Member.Text); conv_Registration.RegistrationFee = Int32.Parse(txtRegistrationFee.Text); conv_Registration.Lunch1No = Int32.Parse(txtLunch1No.Text); conv_Registration.Lunch1Amount = Int32.Parse(txtLunch1Amount.Text); conv_Registration.Lunch2No = Int32.Parse(txtLunch2No.Text); conv_Registration.Lunch2Amount = Int32.Parse(txtLunch2Amount.Text); conv_Registration.Dinner1 = Int32.Parse(txtDinner1.Text); conv_Registration.Dinner2 = Int32.Parse(txtDinner2.Text); conv_Registration.LadiesBag = Int32.Parse(txtLadiesBag.Text); conv_Registration.IEBTie = Int32.Parse(txtIEBTie.Text); conv_Registration.TotalIEBFee = Int32.Parse(txtTotalIEBFee.Text); conv_Registration.BKashFees = Int32.Parse(txtBKashFees.Text); conv_Registration.TotalPayable = Int32.Parse(txtTotalPayable.Text); conv_Registration.TrxID = txtTrx.Text; conv_Registration.AddedDate = DateTime.Now; conv_Registration.TypeID = Int32.Parse(txtType.Text); conv_Registration.StatusID = Int32.Parse(txtStatus.Text); conv_Registration.ExtraField1 = txtExtraField1.Text; conv_Registration.ExtraField2 = txtExtraField2.Text; conv_Registration.ExtraField3 = txtExtraField3.Text; conv_Registration.ExtraField4 = txtExtraField4.Text; conv_Registration.ExtraField5 = txtExtraField5.Text; int resutl = Conv_RegistrationManager.InsertConv_Registration(conv_Registration); Response.Redirect("AdminConv_RegistrationDisplayAdmin.aspx"); }
private void showConv_RegistrationData() { Conv_Registration conv_Registration = new Conv_Registration(); conv_Registration = Conv_RegistrationManager.GetConv_RegistrationByID(Int32.Parse(Request.QueryString["conv_RegistrationID"])); txtConv_ConventionID.Text = conv_Registration.Conv_ConventionID.ToString(); txtMem_Member.Text = conv_Registration.Mem_MemberID.ToString(); txtRegistrationFee.Text = conv_Registration.RegistrationFee.ToString(); txtLunch1No.Text = conv_Registration.Lunch1No.ToString(); txtLunch1Amount.Text = conv_Registration.Lunch1Amount.ToString(); txtLunch2No.Text = conv_Registration.Lunch2No.ToString(); txtLunch2Amount.Text = conv_Registration.Lunch2Amount.ToString(); txtDinner1.Text = conv_Registration.Dinner1.ToString(); txtDinner2.Text = conv_Registration.Dinner2.ToString(); txtLadiesBag.Text = conv_Registration.LadiesBag.ToString(); txtIEBTie.Text = conv_Registration.IEBTie.ToString(); txtTotalIEBFee.Text = conv_Registration.TotalIEBFee.ToString(); txtBKashFees.Text = conv_Registration.BKashFees.ToString(); txtTotalPayable.Text = conv_Registration.TotalPayable.ToString(); txtTrx.Text = conv_Registration.TrxID.ToString(); txtType.Text = conv_Registration.TypeID.ToString(); txtStatus.Text = conv_Registration.StatusID.ToString(); //txtExtraField1.Text = conv_Registration.ExtraField1; //txtExtraField2.Text = conv_Registration.ExtraField2; txtExtraField3.Text = conv_Registration.ExtraField3; txtExtraField4.Text = conv_Registration.ExtraField4; txtExtraField5.Text = conv_Registration.ExtraField5; }
public static Conv_Registration GetConv_RegistrationByID(int id) { Conv_Registration conv_Registration = new Conv_Registration(); SqlConv_RegistrationProvider sqlConv_RegistrationProvider = new SqlConv_RegistrationProvider(); conv_Registration = sqlConv_RegistrationProvider.GetConv_RegistrationByID(id); return(conv_Registration); }
protected void btnUpdate_Click(object sender, EventArgs e) { Conv_Registration tempConv_Registration = new Conv_Registration(); tempConv_Registration = Conv_RegistrationManager.GetConv_RegistrationByID(Int32.Parse(Request.QueryString["conv_RegistrationID"])); Conv_Registration conv_Registration = new Conv_Registration(); conv_Registration.Conv_RegistrationID = tempConv_Registration.Conv_RegistrationID; conv_Registration.Conv_ConventionID = Int32.Parse(txtConv_ConventionID.Text); conv_Registration.Mem_MemberID = Int32.Parse(txtMem_Member.Text); conv_Registration.RegistrationFee = Int32.Parse(txtRegistrationFee.Text); conv_Registration.Lunch1No = Int32.Parse(txtLunch1No.Text); conv_Registration.Lunch1Amount = Int32.Parse(txtLunch1Amount.Text); conv_Registration.Lunch2No = Int32.Parse(txtLunch2No.Text); conv_Registration.Lunch2Amount = Int32.Parse(txtLunch2Amount.Text); conv_Registration.Dinner1 = Int32.Parse(txtDinner1.Text); conv_Registration.Dinner2 = Int32.Parse(txtDinner2.Text); conv_Registration.LadiesBag = Int32.Parse(txtLadiesBag.Text); conv_Registration.IEBTie = Int32.Parse(txtIEBTie.Text); conv_Registration.TotalIEBFee = Int32.Parse(txtTotalIEBFee.Text); conv_Registration.BKashFees = Int32.Parse(txtBKashFees.Text); conv_Registration.TotalPayable = Int32.Parse(txtTotalPayable.Text); conv_Registration.TrxID = txtTrx.Text; conv_Registration.AddedDate = tempConv_Registration.AddedDate; conv_Registration.TypeID = Int32.Parse(txtType.Text); conv_Registration.StatusID = Int32.Parse(txtStatus.Text); conv_Registration.ExtraField1 = "";// tempConv_Registration.ExtraField1; if (tempConv_Registration.ExtraField2 != "") { conv_Registration.ExtraField2 = tempConv_Registration.ExtraField2.Replace("EnterTrxID", conv_Registration.TrxID); } else { conv_Registration.ExtraField2 = tempConv_Registration.ExtraField1.Replace( @"<tr> <td style='border:1px solid black; text-align:left;' colspan='3'>Please write down here the Transaction ID(TraxID) which you will receive from bKash by SMS</td> <td style='border:1px solid black;' colspan='2'> </td> </tr>", "<td style='border:1px solid black; text-align:right;' colspan='3'>Transaction ID(TrxID)</td> <td style='border:1px solid black;' colspan='2'>" + txtTrx.Text + "</td>").Replace( "<img src='http://iebbd.org/images/Convention/55/formHeader.png' width='400px'/>", "<img src='http://iebbd.org/images/Convention/55/formHeader.png' width='400px'/><br/>Money Receipt"); } conv_Registration.ExtraField3 = txtExtraField3.Text; conv_Registration.ExtraField4 = txtExtraField4.Text; conv_Registration.ExtraField5 = txtExtraField5.Text; bool result = Conv_RegistrationManager.UpdateConv_Registration(conv_Registration); Response.Redirect("AdminConv_RegistrationDisplayAdmin.aspx"); }
public Conv_Registration GetConv_RegistrationFromReader(IDataReader reader) { try { Conv_Registration conv_Registration = new Conv_Registration ( (int)reader["Conv_RegistrationID"], (int)reader["Conv_ConventionID"], (int)reader["Mem_MemberID"], (int)reader["RegistrationFee"], (int)reader["Lunch1No"], (int)reader["Lunch1Amount"], (int)reader["Lunch2No"], (int)reader["Lunch2Amount"], (int)reader["Dinner1"], (int)reader["Dinner2"], (int)reader["LadiesBag"], (int)reader["IEBTie"], (int)reader["TotalIEBFee"], (int)reader["BKashFees"], (int)reader["TotalPayable"], reader["TrxID"].ToString(), (DateTime)reader["AddedDate"], (int)reader["TypeID"], (int)reader["StatusID"], reader["ExtraField1"].ToString(), reader["ExtraField2"].ToString(), reader["ExtraField3"].ToString(), reader["ExtraField4"].ToString(), reader["ExtraField5"].ToString() ); return(conv_Registration); } catch (Exception ex) { return(null); } }
public bool UpdateConv_Registration(Conv_Registration conv_Registration) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("IEB_UpdateConv_Registration", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Conv_RegistrationID", SqlDbType.Int).Value = conv_Registration.Conv_RegistrationID; cmd.Parameters.Add("@Conv_ConventionID", SqlDbType.Int).Value = conv_Registration.Conv_ConventionID; cmd.Parameters.Add("@Mem_MemberID", SqlDbType.Int).Value = conv_Registration.Mem_MemberID; cmd.Parameters.Add("@RegistrationFee", SqlDbType.Int).Value = conv_Registration.RegistrationFee; cmd.Parameters.Add("@Lunch1No", SqlDbType.Int).Value = conv_Registration.Lunch1No; cmd.Parameters.Add("@Lunch1Amount", SqlDbType.Int).Value = conv_Registration.Lunch1Amount; cmd.Parameters.Add("@Lunch2No", SqlDbType.Int).Value = conv_Registration.Lunch2No; cmd.Parameters.Add("@Lunch2Amount", SqlDbType.Int).Value = conv_Registration.Lunch2Amount; cmd.Parameters.Add("@Dinner1", SqlDbType.Int).Value = conv_Registration.Dinner1; cmd.Parameters.Add("@Dinner2", SqlDbType.Int).Value = conv_Registration.Dinner2; cmd.Parameters.Add("@LadiesBag", SqlDbType.Int).Value = conv_Registration.LadiesBag; cmd.Parameters.Add("@IEBTie", SqlDbType.Int).Value = conv_Registration.IEBTie; cmd.Parameters.Add("@TotalIEBFee", SqlDbType.Int).Value = conv_Registration.TotalIEBFee; cmd.Parameters.Add("@BKashFees", SqlDbType.Int).Value = conv_Registration.BKashFees; cmd.Parameters.Add("@TotalPayable", SqlDbType.Int).Value = conv_Registration.TotalPayable; cmd.Parameters.Add("@TrxID", SqlDbType.NVarChar).Value = conv_Registration.TrxID; cmd.Parameters.Add("@AddedDate", SqlDbType.DateTime).Value = conv_Registration.AddedDate; cmd.Parameters.Add("@TypeID", SqlDbType.Int).Value = conv_Registration.TypeID; cmd.Parameters.Add("@StatusID", SqlDbType.Int).Value = conv_Registration.StatusID; cmd.Parameters.Add("@ExtraField1", SqlDbType.NVarChar).Value = conv_Registration.ExtraField1; cmd.Parameters.Add("@ExtraField2", SqlDbType.NVarChar).Value = conv_Registration.ExtraField2; cmd.Parameters.Add("@ExtraField3", SqlDbType.NVarChar).Value = conv_Registration.ExtraField3; cmd.Parameters.Add("@ExtraField4", SqlDbType.NVarChar).Value = conv_Registration.ExtraField4; cmd.Parameters.Add("@ExtraField5", SqlDbType.NVarChar).Value = conv_Registration.ExtraField5; connection.Open(); int result = cmd.ExecuteNonQuery(); return(result == 1); } }
public static bool UpdateConv_Registration(Conv_Registration conv_Registration) { SqlConv_RegistrationProvider sqlConv_RegistrationProvider = new SqlConv_RegistrationProvider(); return(sqlConv_RegistrationProvider.UpdateConv_Registration(conv_Registration)); }
public static int InsertConv_Registration(Conv_Registration conv_Registration) { SqlConv_RegistrationProvider sqlConv_RegistrationProvider = new SqlConv_RegistrationProvider(); return(sqlConv_RegistrationProvider.InsertConv_Registration(conv_Registration)); }
protected void btnConventionFee_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"); RadioButtonList rbtnPaidUpto = (RadioButtonList)gvr.FindControl("rbtnPaidUpto"); if (chkSelect.Checked && txtMemberShipNo.Text.Trim() != "") { sql = @" update Acc_bKash_Final set ExtraField1=(Select cast(Mem_MemberID as nvarchar) from Mem_Member where MemberShipNo ='" + txtMemberShipNo.Text + @"') where TransactionID=" + lblTransactionID.Text + @" SELECT Conv_RegistrationID FROM [Conv_Registration] where Mem_MemberID =(Select Mem_MemberID from Mem_Member where MemberShipNo='" + txtMemberShipNo.Text + @"') "; DataSet dstmp = DatabaseManager.ExecSQL(sql); Conv_Registration tempConv_Registration = new Conv_Registration(); tempConv_Registration = Conv_RegistrationManager.GetConv_RegistrationByID(Int32.Parse(dstmp.Tables[0].Rows[0][0].ToString())); if (tempConv_Registration.ExtraField2 != "") { if (!tempConv_Registration.TrxID.Contains(lblTransactionID.Text)) { tempConv_Registration.TrxID += (tempConv_Registration.TrxID.Trim() == "" ? "" : ", ") + lblTransactionID.Text; } if (tempConv_Registration.ExtraField2.Contains("Money Receipt")) { tempConv_Registration.ExtraField2 = tempConv_Registration.ExtraField2.Replace("EnterTrxID", lblTransactionID.Text); } Conv_RegistrationManager.UpdateConv_Registration(tempConv_Registration); } else if (!tempConv_Registration.ExtraField2.Contains("Transaction ID(TrxID)</td>")) { if (!tempConv_Registration.TrxID.Contains(lblTransactionID.Text)) { tempConv_Registration.TrxID += (tempConv_Registration.TrxID.Trim() == "" ? "" : ", ") + lblTransactionID.Text; } if (!tempConv_Registration.ExtraField2.Contains("Money Receipt")) { tempConv_Registration.ExtraField2 = tempConv_Registration.ExtraField1.Replace( @"<tr> <td style='border:1px solid black; text-align:left;' colspan='3'>Please write down here the Transaction ID(TraxID) which you will receive from bKash by SMS</td> <td style='border:1px solid black;' colspan='2'> </td> </tr>", "<td style='border:1px solid black; text-align:right;' colspan='3'>Transaction ID(TrxID)</td> <td style='border:1px solid black;' colspan='2'>" + lblTransactionID.Text + "</td>").Replace( "<img src='http://iebbd.org/images/Convention/55/formHeader.png' width='400px'/>", "<img src='http://iebbd.org/images/Convention/55/formHeader.png' width='400px'/><br/>Money Receipt"); } Conv_RegistrationManager.UpdateConv_Registration(tempConv_Registration); } //SMS if (lblMobile.Text.Trim() != "") { try { string SMS = "Thanks for bKash payment to IEB.Your registration for Convention 55 is Confirmed. 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); //MyWebRequest myRequest = new MyWebRequest("http://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 (lblEmail.Text.Trim() != "") { try { string mialMessage = "Dear Engr,<br/><br/>Thanks for bKash payment.Your registration for Convention 55 is Confirmed.. Your payment amount(" + lblAmount.Text + ") and trxID: " + lblTransactionID.Text + "<br/>This is system generated payment confirmation mail.<hr/>We will send you the money receipt before 27th April<hr/>With regards<br/>IT Section, IEB<br/>01766674142"; //Sendmail.sendEmail(lblEmail.Text, "IEB Convention 55 Regsitration fee payment confirmation", mialMessage); } catch (Exception ex) { } } } } catch (Exception ex) { } } btnSearch_Click(this, new EventArgs()); }