本文整理汇总了C#中BAL.ClsBAL类的典型用法代码示例。如果您正苦于以下问题:C# ClsBAL类的具体用法?C# ClsBAL怎么用?C# ClsBAL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClsBAL类属于BAL命名空间,在下文中一共展示了ClsBAL类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BindCusRequests
protected void BindCusRequests()
{
try
{
objBAL = new ClsBAL();
ObjDataset = (DataSet)objBAL.GetCusRequests();
if (ObjDataset != null)
{
if (ObjDataset.Tables.Count > 0)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
ddlPageSize.Enabled = lbtnXport2Xcel.Enabled = true;
}
else
{
ddlPageSize.Enabled = lbtnXport2Xcel.Enabled = false;
}
ViewState["CusRequests"] = ObjDataset.Tables[0];
GvCusRequests.DataSource = ObjDataset.Tables[0];
GvCusRequests.DataBind();
}
}
}
catch (Exception ex)
{
throw ex;
}
}
示例2: GetDestinations
public static String GetDestinations(String sourceId)
{
try
{
ClsBAL objBAL = new ClsBAL();
DataSet ObjDataset = objBAL.GetDestinations(sourceId);
StringBuilder sbDestinations = new StringBuilder();
if (ObjDataset != null)
{
if (ObjDataset.Tables.Count > 0)
{
DataTable dtDestinations = ObjDataset.Tables[0];
HttpContext.Current.Session["sesDTDestinations"] = dtDestinations;
sbDestinations.Append("<select id=\"ddldestinationsDiv\" name=\"ddldestinationsDiv\" style=\"width:130px;\" >");
sbDestinations.Append("<option value=''>----------</option>");
if (dtDestinations.Rows.Count > 0)
{
foreach (DataRow item in dtDestinations.Rows)
{
sbDestinations.Append("<option value=" + item["ID"].ToString() + ">" + item["DestinationName"].ToString() + "</option>");
}
}
sbDestinations.Append("</select>");
}
}
return sbDestinations.ToString();
}
catch (Exception ex)
{
throw ex;
}
}
示例3: btnRegister_Click
protected void btnRegister_Click(object sender, EventArgs e)
{
try
{
ClsBAL objManabusBal = new ClsBAL();
string message = "";
message = objManabusBal.UpdateAgentByAgent(txtAgentName.Text.Trim().ToString(),
ddlType.SelectedItem.Text.ToString(),
Convert.ToDateTime(txtDateOfBirth.Text.ToString()),
txtCity.Text.Trim().ToString(),
ddlState.SelectedItem.Text.ToString(),
txtAddress.Text.Trim().ToString(),
txtPinCode.Text.Trim().ToString(),
txtMobileNo.Text.Trim().ToString(),
txtAlternateMobileNo.Text.Trim().ToString(),
txtLandlineNo.Text.Trim().ToString(),
txtEmailId.Text.Trim().ToString(),
txtPAN.Text.Trim().ToString(),
"",
"",
"",
Convert.ToInt32(Session["UserID"].ToString()),
Convert.ToInt32(Session["UserID"].ToString()), Convert.ToInt32(txtCommissionPercentage.Text.ToString()));
lblMsg.InnerHtml = message;
}
catch (Exception ex)
{
lblMsg.InnerHtml = ex.Message;
throw;
}
}
示例4: btnupdate_Click
protected void btnupdate_Click(object sender, EventArgs e)
{
try
{
objBAL = new ClsBAL();
objBAL.ID = Convert.ToInt32(lblId.Text);
objBAL.api = ddlApi.SelectedItem.Text;
objBAL.sourceId = Convert.ToInt32(ddlOperator.SelectedItem.Value);
objBAL.percentage = txtCancelPercenatge.Text;
objBAL.beforeTime = txtBeforeTime.Text;
if (objBAL.UpdateCancelPolicy())
{
lblMsg.Text = "Updated Successfully";
lblMsg.ForeColor = System.Drawing.Color.Green;
txtCancelPercenatge.Text = txtBeforeTime.Text = "";
ddlApi.SelectedIndex = 0;
btnupdate.Visible = btnCancel.Visible = false;
btnsave.Visible = true;
GetCancelPercentages();
}
else
{
lblMsg.Text = "Failed to Update.....";
lblMsg.ForeColor = System.Drawing.Color.Red;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例5: BindSourcesDests
protected void BindSourcesDests()
{
try
{
objBAL = new ClsBAL();
ObjDataset = (DataSet)objBAL.GetSourcesDests();
if (ObjDataset != null)
{
if (ObjDataset.Tables.Count > 0)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
ddllocation.DataSource = ObjDataset.Tables[0];
ddllocation.DataTextField = "SourceName";
ddllocation.DataBind();
ddllocation.Items.Insert(0, "ALL");
}
}
}
}
catch (Exception ex)
{
throw ex;
}
}
示例6: btnsubmit_Click
protected void btnsubmit_Click(object sender, EventArgs e)
{
try
{
objManabusBAL = new ClsBAL();
objManabusBAL.name = txtName.Text;
objManabusBAL.emailId = txtEmail.Text;
objManabusBAL.mobileNo = txtPhone.Text;
objManabusBAL.comments = txtComments.Text;
if (objManabusBAL.AddFeedback())
{
lblmsg.Text = "Feedback submitted successfully to admin. Thanks for your feedback.";
lblmsg.ForeColor = System.Drawing.Color.Green;
txtName.Text = txtEmail.Text = txtPhone.Text = txtComments.Text = "";
}
else
{
lblmsg.Text = "Failed to send feedback. Please find try again.";
lblmsg.ForeColor = System.Drawing.Color.Red;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例7: btnUploadImage_Click
protected void btnUploadImage_Click(object sender, EventArgs e)
{
try
{
if (Session["UserID"] != null)
{
ClsBAL obj = new ClsBAL();
byte[] imageByte = null;
if (fuImage.HasFile)
{
HttpPostedFile postedFile = fuImage.PostedFile;
imageByte = new byte[postedFile.ContentLength];
if (postedFile.ContentLength > 102400)
{ lblMsg.InnerHtml = "The size of image must be less than 100KB(102400 bytes)."; return; }
postedFile.InputStream.Read(imageByte, 0, postedFile.ContentLength);
}
lblMsg.InnerHtml = obj.InsertAgentLogo(Convert.ToInt32(Session["UserID"].ToString()), imageByte);
Image img = (Image)this.Master.FindControl("imgAgentLogo");
img.ImageUrl = imgAgentLogo.ImageUrl = "~/ActualImage.ashx?ID=" + Session["UserID"].ToString();
}
}
catch (Exception ex)
{
lblMsg.InnerHtml = ex.Message;
throw;
}
}
示例8: BindPromocodes
protected void BindPromocodes()
{
try
{
objBAL = new ClsBAL();
ObjDataset = (DataSet)objBAL.GetPromoCodes();
if (ObjDataset != null)
{
if (ObjDataset.Tables.Count > 0)
{
if (ObjDataset.Tables[0].Rows.Count > 0)
{
lbtnXport2Xcel.Enabled = true;
ViewState["PromoCodes"] = ObjDataset.Tables[0];
}
gvPromoCodes.DataSource = ObjDataset.Tables[0];
gvPromoCodes.DataBind();
}
}
}
catch (Exception ex)
{
throw ex;
}
}
示例9: updatebalance
protected void updatebalance()
{
DataSet ds = new DataSet();
ds = objManabusBAL.GetAgentByUserId(Convert.ToInt32(Session["UserID"].ToString()));
if (ds != null)
{
if (ds.Tables.Count > 0)
{
if (ds.Tables[0].Rows.Count > 0)
{
ClsBAL objBal = new ClsBAL();
DateTime? dtime = null;
// string msg = objBal.AddAgentDeposit(Convert.ToInt32(Session["UserID"].ToString())
//, Convert.ToDouble(Session["RechargeAmount"].ToString()), "", Convert.ToInt32(Session["UserID"].ToString())
//, "Payment Gateway", Session["Order_Id"].ToString().ToString(), "");
// lblMsg.InnerText = msg;
lblMsg.InnerText = objBal.InsertDepositUpdateRequest(Convert.ToInt32(Session["UserID"].ToString()), Convert.ToDouble(Session["RechargeAmount"].ToString()),
Convert.ToString(""), Session["Order_Id"].ToString(), "Payment Gateway",
"", "", System.DateTime.Now,
"", Convert.ToInt32(Session["UserID"].ToString()), "Deposited");
if (lblMsg.InnerText.ToString() == "Your request has been submitted successfully. Our Team will get back to you.")
{
lblmessage.Text = "your Amount added Successfully";
objBal.Upstatus(Convert.ToInt32(Session["UserID"].ToString()), Convert.ToDouble((Session["RechargeAmount"].ToString())));
}
}
}
}
}
示例10: AddCashCoupontest
protected bool AddCashCoupontest()
{
try
{
objBAL = new ClsBAL();
objBAL.couponNo = Convert.ToString(GeneratePassword());
objBAL.emailId = Convert.ToString(txtEmailID.Text);
objBAL.Amount = Convert.ToString(txtAmount.Text);
objBAL.createdBy = Convert.ToInt32(Session["UserID"]);
if (objBAL.AddCashCoupon(ref lblMsg))
{
return true;
}
else if (lblMsg.Text == "Already Cash Coupon with this Number Exists")
{
return false;
}
else
{
return false;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例11: AddCashCoupon
protected bool AddCashCoupon(string Amount, string couponCode, string emailid)
{
try
{
ObjBAL = new ClsBAL();
ObjBAL.couponNo = Convert.ToString(couponCode);
ObjBAL.emailId = Convert.ToString(emailid);
ObjBAL.Amount = Convert.ToString(Amount);
ObjBAL.createdBy = null;
if (ObjBAL.AddCashCoupon(ref lblMsg))
{
return true;
}
else if (lblMsg.Text == "Already Cash Coupon with this Number Exists")
{
return false;
}
else
{
return false;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例12: AddCashCoupon
protected bool AddCashCoupon()
{
try
{
objBAL = new ClsBAL();
lblCode.Text = "CC" + GeneratePassword();
objBAL.name = ddlserviceName.SelectedValue;
objBAL.couponNo = Convert.ToString(txtcahcoupon.Text);
objBAL.emailId = Convert.ToString(txtEmailID.Text);
objBAL.Amount = Convert.ToString(txtAmount.Text);
// objBAL.MinAmount = txtminamt.Text.Trim();
// objBAL.MaxAmount = txtmaxamt.Text.Trim();
objBAL.createdBy = Convert.ToInt32(Session["UserID"]);
if (objBAL.AddCashCoupon(ref lblMsg))
{
return true;
}
else if (lblMsg.Text == "Already Cash Coupon with this Number Exists")
{
return false;
}
else
{
return false;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例13: btnEmp_Click
protected void btnEmp_Click(object sender, EventArgs e)
{
try
{
ClsBAL obj = new ClsBAL();
string filename = Path.GetFileName(fuImage.PostedFile.FileName);
fuImage.SaveAs(Server.MapPath("~/saveresumes/" + filename));
string pathname = "~/saveresumes/" + filename;
string filename1 = Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(Server.MapPath("~/savedocs/" + filename1));
string pathname1 = "~/savedocs/" + filename1;
lblEmp.Text = obj.InsertEmpRequest(txtEmpName.Text.ToString(), txtEmpEmail.Text.ToString(), "", txtEmpMobileNo.Text.ToString(),
txtEmpCity.Text.ToString(), ddlState.SelectedItem.Text.ToString(), "", "", "Emp", "", "", "", filename, pathname, filename1, pathname1,txtQualification.Text,txtEmpAddress.Text);
lblEmp.ForeColor = System.Drawing.Color.Green;
txtEmpName.Text = txtEmpEmail.Text = txtEmpMobileNo.Text = txtEmpCity.Text = txtCorCity.Text = txtComments.Text = txtCorDist.Text =txtEmpAddress.Text= txtEmpPinCode.Text=txtQualification.Text="";
ddlState.ClearSelection();
ddlEmpcountry.ClearSelection();
}
catch (Exception ex)
{
lblMsg.Text = ex.Message;
throw;
}
}
示例14: CheckPermission
protected void CheckPermission()
{
try
{
ClsBAL objBAL = new ClsBAL();
objBAL.ID = Convert.ToInt32(Session["UserID"]);
objBAL.screenName = "Recharge Status";
_objDataSet = (DataSet)objBAL.GetPerByUser();
if (_objDataSet != null)
{
if (_objDataSet.Tables[0].Rows.Count > 0)
{
ViewState["UserPermissions"] = _objDataSet.Tables[0];
ViewState["Book"] = _objDataSet.Tables[0].Rows[0]["Book"].ToString();
}
else
{
ViewState["UserPermissions"] = null;
}
}
else
{
ViewState["UserPermissions"] = null;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例15: AddPromoCode
protected bool AddPromoCode()
{
try
{
objBAL = new ClsBAL();
// lblCode.Text = "PC" + GeneratePromocode();
objBAL.name = ddlserviceName.SelectedValue;
objBAL.promoCode = Convert.ToString(txtpromocode.Text);
objBAL.Amount = txtAmount.Text.ToString();
objBAL.monthsToExpire = Convert.ToInt32(txtMonthstoexpire.Text);
//objBAL.MinAmount = txtminamt.Text.Trim();
//objBAL.MaxAmount = txtmaxamt.Text.Trim();
objBAL.createdBy = Convert.ToInt32(Session["UserID"].ToString());
if (objBAL.AddPromoCode(ref lblMsg))
{
return true;
}
else if (lblMsg.Text == "Already Promo code with this Number Exists")
{
return false;
}
else
{
return false;
}
}
catch (Exception ex)
{
throw ex;
}
}