本文整理汇总了C#中BAL.clsMasters.fnInsertRecord方法的典型用法代码示例。如果您正苦于以下问题:C# clsMasters.fnInsertRecord方法的具体用法?C# clsMasters.fnInsertRecord怎么用?C# clsMasters.fnInsertRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BAL.clsMasters
的用法示例。
在下文中一共展示了clsMasters.fnInsertRecord方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnAdd_Click
protected void btnAdd_Click(object sender, EventArgs e)
{
try
{
_objMasters = new clsMasters();
_objMasters.ScreenInd = Masters.InsertTarrif;
// _objDataSet = (DataSet)_objMasters.fnGetData();
_objMasters.OperatorsID =Convert.ToInt32(ddlProvider.SelectedValue);
_objMasters.Denomination =Convert.ToInt32( txtDenomination.Text);
_objMasters.TalkTime = Convert.ToDecimal(txtTalkTime.Text);
_objMasters.Validity = txtValidity.Text;
_objMasters.Description = txtDescription.Text;
if (_objMasters.fnInsertRecord() == true)
{
lblmessage.ForeColor = Color.Green;
lblmessage.Text = "Record saved successfully.";
ddlProvider_SelectedIndexChanged(sender, e);
ddlProvider.SelectedIndex = 0;
txtDenomination.Text = string.Empty;
txtTalkTime.Text = string.Empty;
txtValidity.Text = string.Empty;
txtDescription.Text = string.Empty;
}
else
{
lblmessage.Text = "Insertion Failed";
}
}
catch(Exception ex)
{
throw ex;
}
}
示例2: LogError
public void LogError(String ScreenName, String MethodName, DateTime Time, String ex)
{
try
{
_objMasters = new clsMasters();
_objMasters.ScreenInd = Masters.LogError;
_objMasters.ScreenName = ScreenName.ToString();
_objMasters.MethodName = MethodName.ToString();
_objMasters.Time = Convert.ToDateTime(Time);
_objMasters.Exception = ex.ToString();
_objMasters.fnInsertRecord();
}
catch
{ }
}
示例3: btnSignUp_Click
protected void btnSignUp_Click(object sender, EventArgs e)
{
//if(txtEmailID1.Text =="" || txtFirstName.Text=="" || txtPassword1.Text=="" || txtMobileNum.Text=="" || txtaddress1.Text =="" ||txtState.Text == "" || txtCity.Text=="")
//{
// return;
//}
//else
//{
checkUser();
if (Checked == "available")
{
_objMasters = new clsMasters();
_objMasters.ScreenInd = Masters.UserMst;
_objMasters.EmailID = txtEmailID1.Text.Trim().ToString().ToLower();
_objMasters.FirstName = txtFirstName.Text.Trim();
_objMasters.Password = txtPassword1.Text.Trim().ToString().ToLower();
_objMasters.Mobile_Num = txtMobileNum.Text.Trim();
_objMasters.Address = txtaddress1.Text.Trim();
_objMasters.Statename = txtState.Text.Trim();
_objMasters.cityname = txtCity.Text.Trim();
_objMasters.CountryName = ddlCountry.SelectedValue;
_objMasters.PostalCode = txtUserpostalcode.Text.Trim();
if (_objMasters.fnInsertRecord() == true)
{
lblMsg1.ForeColor = Color.Green;
lblMsg2.ForeColor = Color.Green;
MpeSignUP.Show();
lblMsg1.Text = "Confirmation: ";
lblMsg2.Text = "successfully. Registered";
try
{
string str = string.Empty;
string Body = "Dear <b>" + txtFirstName.Text + "</b>," +
"<br /><br />Let us welcome you recharge with lovejourney.in " +
"Following are your login details. <br/> <br/>" +
" Email ID :<b>" + txtEmailID1.Text.Trim() + "</b><br />" +
" Password : <b>" + txtPassword1.Text.Trim() + "</b><br/>" +
"<br /><br />you have successfully registered in www.lovejourney.in and please" +
"do not hesitate<br /> to write to us at <a href='mailto:[email protected]'>Mail</a> " + " " +
"should you have any questions. <br /><br />Best Regards,<br />Administrator <br /> <a href='http://lovejourney.in'> lovejourney.in</a>" +
"<br /><br />";
MailSender.SendEmail(txtEmailID1.Text.Trim(), "[email protected]", "[email protected]", "LoveJourney-login", Body);
}
catch (Exception ex)
{
throw ex;
}
Login(txtEmailID1.Text.Trim().ToString(), txtPassword1.Text.Trim().ToString());
}
else
{
lblMsg1.Text = "<font color='red'> Error Notification: </font>";
lblMsg2.Text = ".";
}
}
else if (Checked == "null")
{
MpeSignUP.Show();
lblMsg1.Text = "Email ID Already Exists";
lblMsg1.ForeColor = Color.Red;
lblMsg1.Visible = true;
//lblMessage.Text = "Email ID Already Exists";
//Mpe1.Show();
//Clearfields();
}
}
示例4: MobileRecharge
//.........这里部分代码省略.........
// "do not hesitate to write to us at <a href='mailto:[email protected]'>Mail</a>" + "if you have any questions.<br /><br />Best Regards,<br /><a href='http://www.rechargeraja.com'>rechargeraja.com</a> " + "<br /><br />";
// MailSender.SendEmail(Email, "[email protected]", "[email protected]", "rechargeraja-Recharge", body);
// }
// catch (Exception ex)
// {
// isRechargeSuccess = false;
// //throw ex;
// }
// try
// {
// string strUrl = "http://sms.i2space.in/WebServiceSMS.aspx?User=i2space1&passwd=smsc&mobilenumber=" + MobileNumber +
// "&message= Thank You for usingrechargeraja.com to Recharge Mobile no" + MobileNumber + " for Rs" + " " + balance + "& your order Num is" + "" + Session["TransactionID"] + "" + "for Queries ,Email us at [email protected]" +
// "&sid=rechargeraja&mtype=N";
// HttpWebRequest oReq1 = null;
// HttpWebResponse oRes1 = null;
// StreamReader oStream1 = null;
// oReq1 = (HttpWebRequest)WebRequest.Create(strUrl);
// oReq1.Method = "GET";
// oReq1.Timeout = 10000;
// oRes1 = (HttpWebResponse)oReq1.GetResponse();
// oStream1 = new StreamReader(oRes1.GetResponseStream(), Encoding.GetEncoding(1252));
// string strMessage1 = oStream1.ReadToEnd().ToString();
// }
// catch (ArgumentException ex)
// {
// //LogError("redirect.aspx", "sms", DateTime.Now, ex.Message.ToString());
// //Response.Redirect("Error.aspx", false);
// }
// isRechargeSuccess = true;
// //Response.Redirect("Success.aspx", false);
// }
// #endregion
// }
// else
// {
// isRechargeSuccess = false;
// //Response.Redirect("RechargeFailure.aspx", false);
// //LogError("redirect.aspx", "API", DateTime.Now, Session["strMessage"].ToString());
// _objMaster = new clsMasters();
// _objMaster.ScreenInd = Masters.Mobilenew;
// _objMaster.Mobile_Num = Convert.ToString(MobileNumber); //txtMobile.Text.Trim();
// _objMaster.Provider_Name = Convert.ToString(Provider);
// _objMaster.E_Mail = Convert.ToString(Email);
// _objMaster.Amount = Convert.ToDouble(balance);
// _objMaster.Payment = Convert.ToString("Deposited");
// _objMaster.RequestID = requestId.Trim();
// _objMaster.TransactionID = Convert.ToString(Session["strMessage"]);
// _objMaster.IP = IPAddr;
// _objMaster.Status = "Failure";//strMessage.Substring(strMessage.IndexOf("<status>") + 8, 7);
// _objMaster.CreatedBy = "NA";
// _objMaster.ModifiedBy = "NA";
// _objMaster.ModifiedDate = "NA";
// _objMaster.fnInsertRecord();
// // Response.Redirect("Error.aspx", false);
// }
#endregion
}
else
{
isRechargeSuccess = false;
//Response.Redirect("RechargeFailure.aspx", false);
//LogError("redirect.aspx", "API", DateTime.Now, Session["strMessage"].ToString());
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.Mobilenew;
_objMaster.Mobile_Num = MobileNumber; //txtMobile.Text.Trim();
_objMaster.Provider_Name = Provider;
_objMaster.E_Mail = Email;
_objMaster.Amount = Convert.ToDouble(balance);
_objMaster.Payment = Convert.ToString("Deposited");
_objMaster.RequestID = requestId.Trim();
_objMaster.TransactionID = Convert.ToString(Session["strMessage"]);
_objMaster.IP = IPAddr;
_objMaster.Status = "Failure";//strMessage.Substring(strMessage.IndexOf("<status>") + 8, 7);
_objMaster.CreatedBy = "NA";
_objMaster.ModifiedBy = "NA";
_objMaster.ModifiedDate = "NA";
_objMaster.fnInsertRecord();
// Response.Redirect("Error.aspx", false);
}
}
else
{
isRechargeSuccess = false;
//Mpe1.Show();
//lblMessage.Text = "Recharge Has Been Failed Please Try Again Later";
}
return isRechargeSuccess;
}
示例5: btnAdd_Click
protected void btnAdd_Click(object sender, EventArgs e)
{
try
{
_objMasters = new clsMasters();
_objMasters.OperatorType = ddloperators.SelectedValue;
_objMasters.NetworkName = ddlProvider.SelectedItem.Text;
_objMasters.AgentCommission = Convert.ToDecimal(txtRechargeAmount.Text);
_objMasters.Type = ddlName.SelectedValue;
// _objMasters.DistributorID =Convert.ToInt32(ddlName.SelectedValue);
_objMasters.ScreenInd = Masters.GetCommisionByNetwork;
_objDataSet = (DataSet)_objMasters.fnGetData();
if (_objDataSet != null)
{
if (_objDataSet.Tables[0].Rows.Count > 0)
{
DataView dv = _objDataSet.Tables[0].DefaultView;
dv.RowFilter = "Type='" + ddlName.SelectedValue + "'and OperatorType='" + ddloperators.SelectedValue + "' and OperatorsName='" + ddlProvider.SelectedItem.Text+"'";
if (dv.Count > 0)
{
lblmessage.ForeColor = Color.Red;
lblmessage.Text = "Already you have given commission for this network,Please try another one.";
lblmessage.Visible = true;
}
else
{
_objMasters.ScreenInd = Masters.AgentCommission;
_objMasters.OperatorType = ddloperators.SelectedValue;
_objMasters.NetworkName = ddlProvider.SelectedValue;
_objMasters.AgentCommission = Convert.ToDecimal(txtRechargeAmount.Text);
_objMasters.Type = ddlName.SelectedValue;
if (_objMasters.fnInsertRecord() == true)
{
lblmessage.ForeColor = Color.Green;
lblmessage.Text = "Record saved successfully.";
ddlProvider.SelectedIndex = 0;
txtRechargeAmount.Text = string.Empty;
ddloperators.SelectedIndex = 0;
fnLoadPage1();
}
else
{
lblmessage.Text = "Insertion Failed";
}
}
}
else
{
_objMasters.ScreenInd = Masters.AgentCommission;
_objMasters.OperatorType = ddloperators.SelectedValue;
_objMasters.NetworkName = ddlProvider.SelectedValue;
_objMasters.AgentCommission = Convert.ToDecimal(txtRechargeAmount.Text);
_objMasters.Type = ddlName.SelectedValue;
if (_objMasters.fnInsertRecord() == true)
{
lblmessage.ForeColor = Color.Green;
lblmessage.Text = "Record saved successfully.";
ddlProvider.SelectedIndex = 0;
txtRechargeAmount.Text = string.Empty;
ddloperators.SelectedIndex = 0;
fnLoadPage1();
}
else
{
lblmessage.Text = "Insertion Failed";
}
}
}
else
{
_objMasters.ScreenInd = Masters.AgentCommission;
_objMasters.OperatorType = ddloperators.SelectedValue;
_objMasters.NetworkName = ddlProvider.SelectedValue;
_objMasters.AgentCommission = Convert.ToDecimal(txtRechargeAmount.Text);
_objMasters.Type = ddlName.SelectedValue;
if (_objMasters.fnInsertRecord() == true)
{
lblmessage.ForeColor = Color.Green;
lblmessage.Text = "Record saved successfully.";
ddlProvider.SelectedIndex = 0;
txtRechargeAmount.Text = string.Empty;
ddloperators.SelectedIndex = 0;
fnLoadPage1();
}
else
{
lblmessage.Text = "Insertion Failed";
}
}
}
//.........这里部分代码省略.........
示例6: imgbtnGuest_Click
protected void imgbtnGuest_Click(object sender, EventArgs e)
{
try
{
int check;
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.gettimeforusers;
_objMaster.MobileNum = txtMobile.Text.Trim();
_objMaster.Parameter = "Mobile";
_objDataSet = new DataSet();
_objDataSet = (DataSet)_objMaster.fnGetData();
if (_objDataSet.Tables[0].Rows.Count == 0)
{
Session["RMobileNumber"] = txtMobile.Text.Trim();
Session["RProviderName"] = ddlProvider.SelectedValue;
Session["REmailMobile"] = txtEmailMobile.Text.Trim();
// Session["RRechargeAmount"] = Convert.ToDouble(txtRecAmount.Text.Trim());
Session["RRechargeAmount"] = Convert.ToDouble(ddlMobilerechargeamount.Text.Trim());
lblOrderID.Text = GenerateRandomNumber(11);
Session["Order_Id"] = lblOrderID.Text;
#region inserting
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.Mobile;
_objMaster.Mobile_Num = txtMobile.Text.Trim();
_objMaster.UserID = Convert.ToInt32(Session["UserID"]);
_objMaster.Type = "AG";
_objMaster.Provider_Name = ddlProvider.SelectedItem.Value;
_objMaster.E_Mail = txtEmailMobile.Text.Trim();
// _objMaster.Amount = Convert.ToDouble(txtRecAmount.Text.Trim());
_objMaster.Amount = Convert.ToDouble(ddlMobilerechargeamount.Text.Trim());
_objMaster.Payment = "Deposit";
_objMaster.RequestID = lblOrderID.Text.Trim();
_objMaster.TransactionID = Convert.ToString(1111);
_objMaster.IP = ipaddr;
_objMaster.Status = "PENDING";
_objMaster.CreatedBy = "NA";
_objMaster.ModifiedBy = "NA";
_objMaster.ModifiedDate = "NA";
_objMaster.fnInsertRecord();
#endregion
getbalance();
if (Session["Role"].ToString() == "User")
{
Response.Redirect("../User/PaymentMethod.aspx", false);
// Response.Redirect("../Pay.aspx", false);
}
else if (Session["Role"].ToString() == "Agent")
{
if (Convert.ToDecimal(Session["AgentBalance"].ToString()) > Convert.ToInt32(Session["RRechargeAmount"]))
{
lbllowbalance.Text = "";
mobilerecharge();
}
else
{
mpeagentproceed.Show();
lbllowbalance.Visible = true;
lbllowbalance.Text = "Recharge failed.Please contact administrator.";
lbllowbalance.ForeColor = Color.Red;
}
}
else if (Session["Role"].ToString() == "Admin")
{
lbllowbalance.Text = "";
// adminmobilerecharge();
}
}
else if (_objDataSet.Tables[0].Rows.Count > 0)
{
check = Convert.ToInt32(_objDataSet.Tables[0].Rows[0]["Allow"]);
if (check > 0)
{
_objMaster.ScreenInd = Masters.Mobile;
Session["RMobileNumber"] = txtMobile.Text.Trim();
Session["RProviderName"] = ddlProvider.SelectedValue;
Session["REmailMobile"] = txtEmailMobile.Text.Trim();
// Session["RRechargeAmount"] = Convert.ToDouble(txtRecAmount.Text.Trim());
Session["RRechargeAmount"] = Convert.ToDouble(ddlMobilerechargeamount.Text.Trim());
lblOrderID.Text = GenerateRandomNumber(11);
Session["Order_Id"] = lblOrderID.Text;
// MobileRecharge();
#region inserting
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.Mobile;
_objMaster.Mobile_Num = txtMobile.Text.Trim();
_objMaster.UserID = Convert.ToInt32(Session["UserID"]);
_objMaster.Type = "AG";
//.........这里部分代码省略.........
示例7: btnRegister_Click
protected void btnRegister_Click(object sender, EventArgs e)
{
try
{
checkAgent();
if (Checked == "Available")
{
System.DateTime today = System.DateTime.Now;
if (Convert.ToDateTime(txtDOB.Text.Trim()) >= today)
{
lblmsg.Visible = true;
lblmsg.Text = "your DOB should be less than current date";
lblmsg.ForeColor = Color.Red;
lblMsg1.Text = "";
lblMsg2.Text = "";
}
else
{
GeneratePassword();
Session["Password"] = txtPassword.Text;
_objMasters = new clsMasters();
_objMasters.ScreenInd = Masters.Agentregistration;
_objMasters.EmailID = txtEmailIDAgent.Text.Trim().ToLower();
_objMasters.Password = lblPWD.Text;
_objMasters.Title = ddlTitle.SelectedItem.Text;
_objMasters.FirstName = txtFirstName.Text.Trim();
_objMasters.LastName = txtLastName.Text.Trim();
_objMasters.DOB = Convert.ToDateTime(txtDOB.Text.Trim());
_objMasters.Address = txtAddress.Text.Trim();
_objMasters.Pincode = txtPinCode.Text.Trim();
_objMasters.Mobile = txtMobile.Text.Trim();
_objMasters.Landline = txtLandLine.Text.Trim();
_objMasters.Fax = txtFax.Text.Trim();
_objMasters.CountryName = ddlCountry.SelectedValue;
_objMasters.Statename = ddlState.Text;
_objMasters.cityname = ddlCity.Text;
_objMasters.Status ="0";
_objMasters.UserType = ddltype.SelectedValue;
if (_objMasters.fnInsertRecord() == true)
{
btnRegister.Visible = true;
pnlContact.Visible = true;
lblMsg1.ForeColor = Color.Green;
lblMsg2.ForeColor = Color.Green;
lblMsg1.Visible = lblMsg2.Visible = true;
lblMsg1.Text = "Confirmation: ";
lblMsg2.Text = "your details saved successfully,Please Wait for admin approval.";
lblmsg.Visible = false;
clearFields();
}
else
{
lblMsg1.Text = "<font color='red'> Error Notification: </font>";
lblMsg2.Text = "your registration is failed.";
lblmsg.Visible = false;
}
}
}
else if (Checked == "null")
{
lblMsg1.ForeColor = Color.Red;
lblMsg1.Text = " EmailID is Not available";
lblMsg1.Visible = true;
lblmsg.Visible = false;
txtEmailID.Focus();
//Reset(this);
}
}
catch (Exception ex)
{
LogError("AgentLogin", "btnRegister_Click", DateTime.Now, ex.Message.ToString());
Response.Redirect("Error.aspx", false);
}
}
示例8: ImgbtnNetguests_Click
protected void ImgbtnNetguests_Click(object sender, ImageClickEventArgs e)
{
try
{
int check;
Session["Role"] = null;
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.gettime;
_objMaster.MobileNum = Session["RMobileNumber"].ToString();// txtMobile.Text.Trim();
_objMaster.Parameter = "DataCard";
_objDataSet = new DataSet();
_objDataSet = (DataSet)_objMaster.fnGetData();
if (_objDataSet.Tables[0].Rows.Count == 0)
{
_objMaster.ScreenInd = Masters.DataCardnew;
Session["RMobileNumber"] = TextBox123.Text.Trim();
Session["DRProviderName"] = ddlNetConnect.SelectedItem.Value;
Session["REmailMobile"] = txtEmailnet.Text.Trim();
//Session["RRechargeAmount"] = Convert.ToDouble(txtRechargeAmount.Text.Trim());
Session["RRechargeAmount"] = Convert.ToDouble(ddlDatacardRechargeAmount.SelectedItem.Text);
lblOrderID.Text = Convert.ToString(GenerateRandomNumber(11));
Session["Order_Id"] = lblOrderID.Text;
#region inserting
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.DataCardnew;
_objMaster.Mobile = TextBox123.Text.Trim();
_objMaster.Provider_Name = ddlNetConnect.SelectedItem.Value;
_objMaster.E_Mail = txtEmailnet.Text.Trim();
// _objMaster.Amount = Convert.ToDouble(txtRechargeAmount.Text.Trim());
_objMaster.Amount = Convert.ToDouble(ddlDatacardRechargeAmount.SelectedItem.Text);
_objMaster.Name = txtdcguestname.Text;
_objMaster.Address = txtdcguestadddress.Text;
_objMaster.Statename = txtdatacardState.Text;
_objMaster.cityname = txtDataCardCity.Text;
_objMaster.PostalCode = txtDataCardPostalCode.Text;
_objMaster.CountryName = ddlDatacardcountry.SelectedValue;
_objMaster.Payment = "Deposit";
_objMaster.RequestID = lblOrderID.Text.Trim();
_objMaster.TransactionID = Convert.ToString(1111);
_objMaster.IP = ipaddr;
_objMaster.Status = "PENDING";
_objMaster.CreatedBy = "NA";
_objMaster.ModifiedBy = "NA";
_objMaster.ModifiedDate = "NA";
_objMaster.fnInsertRecord();
#endregion
}
else if (_objDataSet.Tables[0].Rows.Count > 0)
{
check = Convert.ToInt32(_objDataSet.Tables[0].Rows[0]["Allow"]);
if (check > 0)
{
_objMaster.ScreenInd = Masters.Mobilenew;
Session["RMobileNumber"] = TextBox123.Text.Trim();
Session["DRProviderName"] = ddlNetConnect.SelectedItem.Value;
Session["REmailMobile"] = txtEmailnet.Text.Trim();
// Session["RRechargeAmount"] = Convert.ToDouble(txtRechargeAmount.Text.Trim());
Session["RRechargeAmount"] = Convert.ToDouble(ddlDatacardRechargeAmount.SelectedItem.Text);
lblOrderID.Text = Convert.ToString(GenerateRandomNumber(11));
Session["Order_Id"] = lblOrderID.Text;
#region inserting
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.DataCardnew;
_objMaster.Mobile_Num = TextBox123.Text.Trim();
_objMaster.Provider_Name = ddlNetConnect.SelectedItem.Value;
_objMaster.E_Mail = txtEmailnet.Text.Trim();
// _objMaster.Amount = Convert.ToDouble(txtRechargeAmount.Text.Trim());
_objMaster.Amount = Convert.ToDouble(ddlDatacardRechargeAmount.SelectedItem.Text);
_objMaster.Name = txtdcguestname.Text;
_objMaster.Address = txtdcguestadddress.Text;
_objMaster.Statename = txtdatacardState.Text;
_objMaster.cityname = txtDataCardCity.Text;
_objMaster.PostalCode = txtDataCardPostalCode.Text;
_objMaster.CountryName = ddlDatacardcountry.SelectedValue;
_objMaster.Payment = "Deposit";
_objMaster.RequestID = lblOrderID.Text.Trim();
_objMaster.TransactionID = Convert.ToString(1111);
_objMaster.IP = ipaddr;
_objMaster.Status = "PENDING";
_objMaster.CreatedBy = "NA";
_objMaster.ModifiedBy = "NA";
_objMaster.ModifiedDate = "NA";
_objMaster.fnInsertRecord();
#endregion
}
else
{
lblMessage.Text = "please Try Again after 15 minutes";
Mpe1.Show();
}
}
//.........这里部分代码省略.........
示例9: DThGuests
protected void DThGuests()
{
try
{
int check;
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.gettime;
_objMaster.Customer_ID = txtCustID.Text.Trim();
_objMaster.Parameter = "DTH";
_objDataSet = new DataSet();
_objDataSet = (DataSet)_objMaster.fnGetData();
if (_objDataSet.Tables[0].Rows.Count == 0)
{
_objMaster.ScreenInd = Masters.Mobilenew;
Session["RMobileNumber"] = txtCustID.Text.Trim();
Session["Rd2hProviderName"] = ddlD2HProvider.SelectedItem.Value;
Session["REmailMobile"] = txtEmailD2H.Text.Trim();
//Session["RRechargeAmount"] = Convert.ToDouble(txtD2HAmount.Text.Trim());
Session["RRechargeAmount"] = ddlD2HAmount.SelectedItem.Text;
lblOrderID.Text = Convert.ToString(GenerateRandomNumber(11));
Session["Order_Id"] = lblOrderID.Text;
#region inserting
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.D2H;
_objMaster.Customer_ID = txtCustID.Text.Trim();
_objMaster.Provider_Name = ddlD2HProvider.SelectedItem.Text;
_objMaster.E_Mail = txtEmailD2H.Text.Trim();
// _objMaster.Amount = Convert.ToDouble(txtD2HAmount.Text.Trim())
_objMaster.Amount = Convert.ToDouble(ddlD2HAmount.SelectedItem.Text);
_objMaster.Name = txtGusetdthname.Text;
_objMaster.Address = txtdthguestaddress.Text;
_objMaster.Statename = txtDTHState.Text;
_objMaster.cityname = txtDTHCity.Text;
_objMaster.PostalCode = txtPostalCodeDTH.Text;
_objMaster.Payment = "Deposit";
_objMaster.RequestID = lblOrderID.Text.Trim();
_objMaster.TransactionID = Convert.ToString(1111);
_objMaster.IP = ipaddr;
_objMaster.Status = "PENDING";
_objMaster.CreatedBy = "NA";
_objMaster.ModifiedBy = "NA";
_objMaster.ModifiedDate = "NA";
_objMaster.fnInsertRecord();
#endregion
//Response.Redirect("Checkout.aspx");
}
else if (_objDataSet.Tables[0].Rows.Count > 0)
{
check = Convert.ToInt32(_objDataSet.Tables[0].Rows[0]["Allow"]);
if (check > 0)
{
_objMaster.ScreenInd = Masters.Mobilenew;
Session["RMobileNumber"] = txtCustID.Text.Trim();
Session["Rd2hProviderName"] = ddlD2HProvider.SelectedItem.Value;
Session["REmailMobile"] = txtEmailD2H.Text.Trim();
// Session["RRechargeAmount"] = Convert.ToDouble(txtD2HAmount.Text.Trim());
Session["RRechargeAmount"] = Convert.ToDouble(ddlD2HAmount.SelectedItem.Text);
lblOrderID.Text = Convert.ToString(GenerateRandomNumber(11));
Session["Order_Id"] = lblOrderID.Text;
#region inserting
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.D2H;
_objMaster.Customer_ID = txtCustID.Text.Trim();
_objMaster.Provider_Name = ddlD2HProvider.SelectedItem.Text;
_objMaster.E_Mail = txtEmailD2H.Text.Trim();
// _objMaster.Amount = Convert.ToDouble(txtD2HAmount.Text.Trim());
_objMaster.Amount = Convert.ToDouble(ddlD2HAmount.SelectedItem.Text);
_objMaster.Name = txtGusetdthname.Text;
_objMaster.Address = txtdthguestaddress.Text;
_objMaster.Statename = txtDTHState.Text;
_objMaster.cityname = txtDTHCity.Text;
_objMaster.PostalCode = txtPostalCodeDTH.Text;
_objMaster.Payment = "Deposit";
_objMaster.RequestID = lblOrderID.Text.Trim();
_objMaster.TransactionID = Convert.ToString(1111);
_objMaster.IP = ipaddr;
_objMaster.Status = "PENDING";
_objMaster.CreatedBy = "NA";
_objMaster.ModifiedBy = "NA";
_objMaster.ModifiedDate = "NA";
_objMaster.fnInsertRecord();
#endregion
}
else
{
lblMessage.Text = "please Try Again after 15 minutes";
Mpe1.Show();
}
}
// Response.Redirect("Pay.aspx", false);
//.........这里部分代码省略.........
示例10: btnAdd_Click
protected void btnAdd_Click(object sender, EventArgs e)
{
try
{
_objMasters = new clsMasters();
_objMasters.ScreenInd = Masters.ListOfAmounts;
_objMasters.OperatorType = ddloperators.SelectedValue;
_objMasters.NetworkName =ddlProvider.SelectedValue;
_objMasters.A_Amount =Convert.ToDecimal(txtRechargeAmount.Text);
//_objMasters.TalkTime = Convert.ToDecimal(txtTalkTime.Text);
_objDataSet = (DataSet)_objMasters.fnGetData();
if (_objDataSet.Tables[0].Rows.Count > 0)
{
DataView dv = _objDataSet.Tables[0].DefaultView;
dv.RowFilter = "NetworkName ='" + ddlProvider.SelectedValue + "' and RechargeAmount='" +txtRechargeAmount.Text.ToString() +"'";
if (dv.Count > 0)
{
lblmessage.Visible = true;
lblmessage.Text = "Already You have added This amount for this network,please add another amount";
lblmessage.ForeColor = Color.Red;
}
else
{
if (_objMasters.fnInsertRecord() == true)
{
lblmessage.ForeColor = Color.Green;
lblmessage.Text = "Record saved successfully.";
ddlProvider.SelectedIndex = 0;
txtRechargeAmount.Text = string.Empty;
//txtTalkTime.Text = string.Empty;
ddlProvider.SelectedIndex = 0;
ddloperators.SelectedIndex = 0;
fnLoadPage1();
}
else
{
lblmessage.Text = "Insertion Failed";
}
}
}
else
{
if (_objMasters.fnInsertRecord() == true)
{
lblmessage.ForeColor = Color.Green;
lblmessage.Text = "Record saved successfully.";
ddlProvider.SelectedIndex = 0;
txtRechargeAmount.Text = string.Empty;
//txtTalkTime.Text = string.Empty;
ddlProvider.SelectedIndex = 0;
ddloperators.SelectedIndex = 0;
fnLoadPage1();
}
else
{
lblmessage.Text = "Insertion Failed";
}
}
}
catch (Exception ex)
{
throw ex;
}
}
示例11: btnDepositUpdate_Click
protected void btnDepositUpdate_Click(object sender, EventArgs e)
{
try
{
ClsBAL objBAL = new ClsBAL();
System.Data.DataSet ds1 = objBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
string balance = ds1.Tables[0].Rows[0]["Balance"].ToString();
if ((Convert.ToDecimal(balance)) > ((Convert.ToDecimal(txtDepositAmount.Text.ToString()) + 25)))
{
if ((Convert.ToDecimal(txtDepositAmount.Text.ToString()) >= Convert.ToDecimal("1000"))
&& (Convert.ToDecimal(txtDepositAmount.Text.ToString())) <= Convert.ToDecimal("25000"))
{
clsMasters _objmasters = new clsMasters();
_objmasters.ScreenInd = Masters.Dmr;
_objmasters.Amount1 = (Convert.ToDecimal(txtDepositAmount.Text.ToString()));
_objmasters.ExtraCharges = Convert.ToDecimal("25");
_objmasters.Date = txtChequeIssueDate.Text.ToString();
_objmasters.Accountholdername = txtholdername.Text;
_objmasters.Accountnumber = txtaccountnumber.Text;
_objmasters.IFSCCode = ifsccode.Text;
_objmasters.BankName = txtbankname.Text;
_objmasters.BranchName = txtbranchname.Text;
_objmasters.SenderName = txtsendername.Text;
_objmasters.MobileNumber = txtMobileNumber.Text;
_objmasters.Status = "No";
_objmasters.CreatedBy = Session["UserID"].ToString();
ClsBAL objBAL1 = new ClsBAL();
System.Data.DataSet ds = objBAL1.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
_objmasters.ID = Convert.ToInt32(ds.Tables[0].Rows[0]["AgentId"].ToString());
if (_objmasters.fnInsertRecord() == true)
{
lblmsg.Text = "Your request submitted succesfully.";
lblmsg.ForeColor = System.Drawing.Color.Green;
ClsBAL objBAL2 = new ClsBAL();
System.Data.DataSet ds2 = objBAL2.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
Session["Balance"] = ds2.Tables[0].Rows[0]["Balance"].ToString();
Label lbl = (Label)this.Master.FindControl("lblBalance");
lbl.Text = Session["Balance"].ToString();
// ClsBAL objBal1 = new ClsBAL();
// string msg = objBal1.DeductAgentDeposit(Convert.ToInt32(Session["UserID"].ToString())
//, Convert.ToDouble(txtDepositAmount.Text.ToString()), "", Convert.ToInt32(Session["UserID"].ToString())
//, "Dmr", "", "");
}
}
else
{
lblmsg.Text = "Your transaction amount should be minimum 1000 and maximum 25000.";
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
else
{
lblmsg.Text = "Your balance should be greater than the transfer amount. ";
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
catch (Exception ex)
{
lblmsg.Text = ex.Message;
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
示例12: imgbtnGuest2Data_Click
protected void imgbtnGuest2Data_Click(object sender, EventArgs e)
{
try
{
int check;
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.gettimeforusers;
_objMaster.MobileNum = TextBox123.Text.Trim();
_objMaster.Parameter = "DataCard";
_objDataSet = new DataSet();
_objDataSet = (DataSet)_objMaster.fnGetData();
if (_objDataSet.Tables[0].Rows.Count == 0)
{
_objMaster.ScreenInd = Masters.DataCard;
Session["RMobileNumber"] = TextBox123.Text.Trim();
Session["RProviderName"] = ddlNetConnect.SelectedItem.Value;
Session["REmailMobile"] = txtEmailnet.Text.Trim();
// Session["RRechargeAmount"] = Convert.ToDouble(txtRechargeAmount.Text.Trim());
Session["RRechargeAmount"] = Convert.ToDouble(ddlDatacardRechargeAmount.Text.Trim());
lblOrderID.Text = GenerateRandomNumber(11);
Session["Order_Id"] = lblOrderID.Text;
#region inserting
_objMaster = new clsMasters();
_objMaster.ScreenInd = Masters.DataCard;
_objMaster.Mobile = TextBox123.Text.Trim();
_objMaster.UserID = Convert.ToInt32(Session["UserID"]);
if (Session["Role"].ToString() == "CSE")
{
if (chkdataonbehalfof.Checked == true)
{
ListItem value = ddlagentnameDTCD.Items.FindByText(txtagentnameDTCD.Text.ToString());
if (value != null)
{
ddlagentnameDTCD.SelectedItem.Value = value.Value;
_objMaster.UserID = Convert.ToInt32(ddlagentnameDTCD.SelectedValue);
Session["AgentId_Agent"] = ddlagentnameDTCD.SelectedItem.Value;
}
else
{
}
_objMaster.Type = "AG";
}
else
{
_objMaster.Type = "CSE";
}
}
else if (Session["Role"].ToString() == "Admin")
{
_objMaster.Type = "AD";
}
else if (Session["Role"].ToString() == "User")
{
_objMaster.Type = "User";
}
else if (Session["Role"].ToString() == "Distributor")
{
_objMaster.Type = "Distributor";
}
_objMaster.Provider_Name = ddlNetConnect.SelectedItem.Value;
_objMaster.E_Mail = txtEmailnet.Text.Trim();
//_objMaster.Amount = Convert.ToDouble(txtRechargeAmount.Text.Trim());
_objMaster.Amount = Convert.ToDouble(ddlDatacardRechargeAmount.Text.Trim());
_objMaster.Payment = "Deposit";
_objMaster.RequestID = lblOrderID.Text.Trim();
_objMaster.TransactionID = Convert.ToString(1111);
_objMaster.IP = ipaddr;
_objMaster.Status = "PENDING";
_objMaster.CreatedBy = "NA";
_objMaster.ModifiedBy = "NA";
_objMaster.ModifiedDate = "NA";
_objMaster.fnInsertRecord();
#endregion
//getbalance();
if (Session["Role"].ToString() == "User")
{
Response.Redirect("~/Pay.aspx", false);
}
else if (Session["Role"].ToString() == "Distributor")
{
if (Convert.ToDecimal(Session["AgentBalance"].ToString()) > Convert.ToInt32(Session["RRechargeAmount"]))
{
lbllowbalance.Text = "";
DataCardRecharge();
}
else
{
mpeagentdatacard.Show();
lbldacdLowbalance.Visible = true;
lbldacdLowbalance.Text = "Insufficient funds to recharge";
lbldacdLowbalance.ForeColor = Color.Red;
}
}
else if (Session["Role"].ToString() == "Admin")
//.........这里部分代码省略.........