public void RetrieveUserplantype() { try { objUserplantype = new Userplantype(); objBL_PlanType = new BL_PlanType(); lstUserplantype = new List<Userplantype>(); lstUserplantype = objBL_PlanType.SelectUserplantypeforcampid(Convert.ToInt32(HttpUtility.UrlDecode(Request.QueryString["PlantypId"]).ToString())); if (lstUserplantype.Count > 0) { txtCampaignName.Value = lstUserplantype[0].PlanName; if (lstUserplantype[0].IsSingleUser == true) rbuserselect.SelectedValue = "1"; else rbuserselect.SelectedValue = "0"; txtPlanRate.Value = lstUserplantype[0].Planrate.ToString(); txtnosubscribers.Value = lstUserplantype[0].NOC.ToString(); txtnomails.Value = lstUserplantype[0].AllowedMails.ToString(); if (lstUserplantype[0].IsActive == true) chkactive.Checked = true; } lstUserplantype = null; objBL_PlanType = null; objUserplantype = null; } catch (Exception ex) { New_EmailCampaign.App_Code.GlobalFunction.StoreLog("UserPlanType.aspx:RetrieveUserplantype() - " + ex.Message); } }
public void SessionSaving() { try { objUserplantype = new Userplantype(); objBL_PlanType = new BL_PlanType(); lstUserPlanType = new List<Userplantype>(); int PlanID = Convert.ToInt32(Request.QueryString["PlanID"].ToString()); lstUserPlanType = objBL_PlanType.SelectUserplantypeforcampid(PlanID); if (lstUserPlanType.Count > 0) { string[] UPtype = new string[3]; UPtype[0] = Convert.ToString(lstUserPlanType[0].IsSingleUser); UPtype[1] = Convert.ToString(lstUserPlanType[0].NOC); UPtype[2] = Convert.ToString(lstUserPlanType[0].AllowedMails); Session["lstUserPlanType"] = UPtype; } } catch (Exception ex) { New_EmailCampaign.App_Code.GlobalFunction.StoreLog("UserPlanSuccess.aspx:SessionSaving() - " + ex.Message); } }
public void UserplantypeInsert(Userplantype objUserplantype) { objEmailCampDataContext = new EmailCampDataContext(); var Insert = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "i") select cde).ToList(); Insert = null; objEmailCampDataContext = null; }
protected void btnSubmit_Click(object sender, EventArgs e) { try { objUserplantype = new Userplantype(); lstUserplantype = new List<Userplantype>(); if (Request.QueryString["PlantypId"] != null) { objUserplantype = new Userplantype(); lstUserplantype = new List<Userplantype>(); objBL_PlanType = new BL_PlanType(); lstUserplantype = objBL_PlanType.SelectUserplantypeforcampid(Convert.ToInt32(HttpUtility.UrlDecode(Request.QueryString["PlantypId"]).ToString())); if (lstUserplantype.Count > 0) { objBL_Common.AccessUpdateAllCampaign("EC_PlanType", "PlanName= '" + txtCampaignName.Value + "', IsSingleUser= "******", Planrate= " + txtPlanRate.Value + ", NOC= " + txtnosubscribers.Value + ", AllowedMails = " + txtnomails.Value + ", UpdatedBy = " + Convert.ToInt32(Session["UserID"].ToString()) + ", UpdatedOn = '" + DateTime.Now + "' ", "PK_PlanID =" + Convert.ToInt32(HttpUtility.UrlDecode(Request.QueryString["PlantypId"]).ToString()) + ""); } lstUserplantype = null; objUserplantype = null; objBL_PlanType = null; } else { objUserplantype.PlanName = txtCampaignName.Value; if (Convert.ToInt32(rbuserselect.SelectedValue) == 1) objUserplantype.IsSingleUser = true; else objUserplantype.IsSingleUser = false; objUserplantype.Planrate = Convert.ToInt32(txtPlanRate.Value); objUserplantype.NOC = Convert.ToInt32(txtnosubscribers.Value); objUserplantype.AllowedMails = Convert.ToInt32(txtnomails.Value); if (chkactive.Checked == true) objUserplantype.IsActive = true; else objUserplantype.IsActive = false; objUserplantype.Plandate = DateTime.Now; objUserplantype.CreatedOn = DateTime.Now; objUserplantype.CreatedBy = Convert.ToInt32(Session["UserID"].ToString()); objBL_PlanType.AccessInsertUserplantype(objUserplantype); } ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "Clearuserinput2();", true); } catch (Exception ex) { New_EmailCampaign.App_Code.GlobalFunction.StoreLog("UserPlanType.aspx:btnSubmit_Click() - " + ex.Message); } }
public void BindCampaignListGrid() { try { objUserplantype = new Userplantype(); lstUserplantype = objBL_PlanType.SelectAllUserplantype(); gvcampaign.DataSource = lstUserplantype; gvcampaign.DataBind(); } catch (Exception ex) { New_EmailCampaign.App_Code.GlobalFunction.StoreLog("UserPlanTypeDetails.aspx:BindCampaignListGrid() - " + ex.Message); } }
public void UserplantypeDelete(int Userplantypeid) { try { objEmailCampDataContext = new EmailCampDataContext(); var Delete = (from cde in objEmailCampDataContext.spPlanType_AllActions(Userplantypeid, null, null, null, null, null, null, null, null, null, null, null, "d") select cde).ToList(); Delete = null; objUserplantype = null; objEmailCampDataContext = null; } catch (Exception ex) { ex.ToString(); } }
public List<Userplantype> UserplantypeSelect(int PK_UserplantypeID) { objEmailCampDataContext = new EmailCampDataContext(); lstUserplantype = new List<Userplantype>(); var Select = (from cde in objEmailCampDataContext.spPlanType_AllActions(PK_UserplantypeID, null, null, null, null, null, null, null, null, null, null, null, "s") select cde).ToList(); if (Select.Count > 0) { lstUserplantype = new List<Userplantype>(); foreach (var item in Select) { objUserplantype = new Userplantype(); objUserplantype.PK_PlanID = item.PK_PlanID; objUserplantype.PlanName = item.PlanName; objUserplantype.IsSingleUser = item.IsSingleUser; objUserplantype.Planrate = item.Planrate; if(item.NOC != null) objUserplantype.NOC = Convert.ToInt32(item.NOC); objUserplantype.AllowedMails = Convert.ToInt32(item.AllowedMails); objUserplantype.IsActive = item.IsActive; objUserplantype.Plandate = item.plandate; objUserplantype.CreatedOn = item.CreatedOn; objUserplantype.CreatedBy = item.CreatedBy; objUserplantype.UpdatedBy = item.UpdatedBy; objUserplantype.UpdatedOn = item.UpdatedOn; lstUserplantype.Add(objUserplantype); } } objEmailCampDataContext = null; objUserplantype = null; return lstUserplantype; }
public void UserplantypeUpdate(Userplantype objUserplantype) { try { objEmailCampDataContext = new EmailCampDataContext(); var Update = (from cde in objEmailCampDataContext.spPlanType_AllActions(objUserplantype.PK_PlanID, objUserplantype.PlanName, objUserplantype.IsSingleUser, objUserplantype.Planrate, objUserplantype.NOC, objUserplantype.AllowedMails, objUserplantype.IsActive, objUserplantype.CreatedBy, objUserplantype.CreatedOn, objUserplantype.UpdatedBy, objUserplantype.UpdatedOn, objUserplantype.Plandate, "u") select cde).ToList(); Update = null; objUserplantype = null; objEmailCampDataContext = null; } catch (Exception ex) { ex.ToString(); } }
public void AccessUpdateUserplantype(Userplantype objUserplantype1) { objDL_PlanType.UserplantypeUpdate(objUserplantype1); }
public void AccessInsertUserplantype(Userplantype objUserplantype1) { objDL_PlanType.UserplantypeInsert(objUserplantype1); }
private void BindGrid() { try { lstUserplantype = new List<Userplantype>(); objBL_PlanType = new BL_PlanType(); objUserplantype = new Userplantype(); lstUserplantype = objBL_PlanType.SelectAllUserplantypebasedonisactive(); string PlanName = ""; string Planprice = ""; int NoSubscribers = 0; int AllowdMails = 0; lblUsrPlan.Text = string.Empty; if (lstUserplantype.Count > 1) { lblUsrPlan.Text = "<section id='pricePlans'><ul id='plans'>"; for (int i = 0; i < lstUserplantype.Count; i++) { PlanName = lstUserplantype[i].PlanName; if (lstUserplantype[i].Planrate != null) Planprice = lstUserplantype[i].Planrate.ToString(); NoSubscribers = lstUserplantype[i].NOC; AllowdMails = lstUserplantype[i].AllowedMails; if (i == 0) lblUsrPlan.Text += "<li class='plan'> <ul class='planContainer'> <li class='title'><h2><span id='RepDetails_lblSubject_0'>"; else lblUsrPlan.Text += "<li class='plan'> <ul class='planContainer'> <li class='title'><h2><span id='RepDetails_lblSubject_0'>"; lblUsrPlan.Text += PlanName + "</h2></li><li class='price'><h1 class='bestPlanPrice'><span>$"; lblUsrPlan.Text += Planprice + " / month</span> <small>No FREE trial</small> </h1></li><li><ul class='options'><li>Number of Subscribers:<span id='RepDetails_lblnos_0'>"; lblUsrPlan.Text += NoSubscribers + "</span> </li><li>Allowed Mails:<span id='RepDetails_lblComment_0'>"; lblUsrPlan.Text += AllowdMails + "</span> </li><li>Is Single User"; if (lstUserplantype[i].IsSingleUser == true) lblUsrPlan.Text += "<img id='img" + lstUserplantype[i].PK_PlanID.ToString() + "' src='images/Tick_inside_a_circle_24(1).png' border='0' style='width:30px;height:30px;'/>"; lblUsrPlan.Text += "</li><li> Is Multiple User"; if (lstUserplantype[i].IsSingleUser == false) lblUsrPlan.Text += "<img id='img" + lstUserplantype[i].PK_PlanID.ToString() + "' src='images/Tick_inside_a_circle_24(1).png' border='0' style='width:30px;height:30px;'/>"; lblUsrPlan.Text += "</li><li>Masss Email </li></ul></li><li class='button'><input name='btnCo" + i.ToString() + "' type='button' value='TRY THIS PLAN' "; if (Convert.ToInt64(Session["Usertype"]) != 10) lblUsrPlan.Text += "onclick=location.href='UserPlanSuccess.aspx?PlanID=" + lstUserplantype[i].PK_PlanID + "'>"; lblUsrPlan.Text += " </li></ul>";//<a href='#' class='btn btn-success' role='button' name='RepDetails$ctl01$email' id='RepDetails_email_0' type='submit'>TRY THIS PLAN</a> PlanName = ""; Planprice = ""; NoSubscribers = 0; AllowdMails = 0; } lblUsrPlan.Text += "</ul></section>"; } } catch (Exception ex) { New_EmailCampaign.App_Code.GlobalFunction.StoreLog("UserPlanView.aspx:BindGrid() - " + ex.Message); } }