protected void update_Click(object sender, EventArgs e) { int ServLineId = Convert.ToInt32(Request.QueryString["ID"]); string SLMIds = ""; ServiceLineRepository SLrepo = new ServiceLineRepository(); for (int SLMcount = 0; SLMcount < SLMcheckList.Items.Count; SLMcount++) { if (SLMcheckList.Items[SLMcount].Selected) { SLMIds = SLMIds + SLMcheckList.Items[SLMcount].Value + ","; } } for (int SLMcount = 0; SLMcount < CheckBoxList1.Items.Count; SLMcount++) { if (CheckBoxList1.Items[SLMcount].Selected) { SLMIds = SLMIds + CheckBoxList1.Items[SLMcount].Value + ","; } } SLMIds = SLMIds.Substring(0, SLMIds.Length - 1); SLrepo.EditServiceLine(ServLineId, SLMIds); Response.Redirect("~/SAServiceLines.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (!Context.User.IsInRole("Super Admin")) { Response.Redirect("Access.aspx"); } if (!IsPostBack) { string ServLineName = Request.QueryString["ServLineName"]; ServiceLineName.Text = ServLineName; string ServLineId = Request.QueryString["ID"]; ServiceLineRepository SLRepo = new ServiceLineRepository(); SLRepo.getServLineDetails(ServLineId); SelectAllUsers selectAllUsers = new SelectAllUsers(); SLMcheckList.DataSource = SLRepo.ServLineManTab; SLMcheckList.DataTextField = "UserName"; SLMcheckList.DataValueField = "Id"; SLMcheckList.DataBind(); for (int i = 0; i < SLMcheckList.Items.Count; i++) { SLMcheckList.Items[i].Selected = true; } CheckBoxList1.DataSource = selectAllUsers.getDetails(); CheckBoxList1.DataTextField = "UserName"; CheckBoxList1.DataValueField = "Id"; CheckBoxList1.DataBind(); } }
protected void update_Click(object sender, EventArgs e) { int ServLineId = Convert.ToInt32(Request.QueryString["ID"]); string OMIds = ""; ServiceLineRepository SLrepo = new ServiceLineRepository(); for (int SLMcount = 0; SLMcount < OMCheckList.Items.Count; SLMcount++) { if (OMCheckList.Items[SLMcount].Selected) { OMIds = OMIds + OMCheckList.Items[SLMcount].Value + ","; } } for (int SLMcount = 0; SLMcount < OMCheckList1.Items.Count; SLMcount++) { if (OMCheckList1.Items[SLMcount].Selected) { OMIds = OMIds + OMCheckList1.Items[SLMcount].Value + ","; } } OMIds = OMIds.Substring(0, OMIds.Length - 1); // SLrepo.EditServiceLine(ServLineId, OMIds); SLrepo.UpdateAfterDeleteServiceLine(ServLineId, OMIds); Response.Redirect("~/SLMServiceLines.aspx"); }
protected void yes_Click(object sender, EventArgs e) { ServiceLineRepository inventory = new ServiceLineRepository(); int Id = Convert.ToInt32(Request.QueryString["Id"]); //int Id = Convert.ToInt32(Request.QueryString["Id"]); //DeleteServiceLine deleteServiceLine = new DeleteServiceLine(); //Response.Redirect("SAServiceLines.aspx"); inventory.DeleteServiceLine(Id); Response.Redirect("SAServiceLines.aspx"); }
protected void Page_Load(object sender, EventArgs e) { if (!Context.User.IsInRole("ServiceLine Manager")) { Response.Redirect("Access.aspx"); } string ServiceName = Request.QueryString["ServLineName"]; ServLineName.Text = ServiceName; if (!IsPostBack) { string ServLineName = Request.QueryString["ServLineName"]; //OMCheckList.Text = ServLineName; string ServLineId = Request.QueryString["ID"]; int ServLineId1 = Convert.ToInt32(Request.QueryString["ID"]); ServiceLineRepository SLrepo = new ServiceLineRepository(); SLMServiceLine SlMRepo = new SLMServiceLine(); SlMRepo.getServLineOMDetails(ServLineId); SlMRepo.getAllOMDetails(); SlMRepo.getAllOMDetailsOfServiceLineManagers(ServLineId); SelectAllUsers selectAllUsers = new SelectAllUsers(); OMCheckList.DataSource = SlMRepo.ServLineOMTab; OMCheckList.DataTextField = "UserName"; OMCheckList.DataValueField = "Id"; OMCheckList.DataBind(); for (int i = 0; i < OMCheckList.Items.Count; i++) { OMCheckList.Items[i].Selected = true; string OmId = OMCheckList.Items[i].Value; SLrepo.EditServiceLineOMwhileload(ServLineId1, OmId); } //OMCheckList1.DataSource = SlMRepo.ServLineOMList; //OMCheckList1.DataTextField = "UserName"; //OMCheckList1.DataValueField = "Id"; //OMCheckList1.DataBind(); //CheckBoxList2.DataSource = SlMRepo.getAllOMDetailsOfServiceLineManagers(ServLineId); CheckBoxList2.DataSource = SlMRepo.ServLineOMList; CheckBoxList2.DataTextField = "UserName"; CheckBoxList2.DataValueField = "Id"; CheckBoxList2.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Context.User.IsInRole("Super Admin")) { Response.Redirect("Access.aspx"); } Table table = new Table(); table.ID = "1"; PlaceHolder1.Controls.Add(table); ServiceLineRepository lineRepository = new ServiceLineRepository(); lineRepository.getDetails(); for (int count = 0; count < lineRepository.servicelinelist.Count; count++) { TableRow row = new TableRow(); table.Rows.Add(row); TableCell cell = new TableCell(); row.Cells.Add(cell); Label label = new Label(); label.Text = lineRepository.servicelinelist[count].Name; label.Width = 150; PlaceHolder1.Controls.Add(label); HyperLink edit = new HyperLink(); edit.Text = "Edit"; edit.NavigateUrl = "~/SAServiceLinesEdit.aspx?ID=" + lineRepository.servicelinelist[count].Id + "&&ServLineName=" + lineRepository.servicelinelist[count].Name; edit.Width = 150; PlaceHolder1.Controls.Add(edit); HyperLink Delete = new HyperLink(); Delete.Text = "Delete"; Delete.NavigateUrl = "~/SAServiceLinesDelete.aspx?ID= " + lineRepository.servicelinelist[count].Id; Delete.Width = 150; PlaceHolder1.Controls.Add(Delete); PlaceHolder1.Controls.Add(new LiteralControl("<br/>")); } }
protected void update_Click(object sender, EventArgs e) { int ServLineId = Convert.ToInt32(Request.QueryString["ID"]); string OMIds = ""; ServiceLineRepository SLrepo = new ServiceLineRepository(); for (int SLMcount = 0; SLMcount < OMCheckList.Items.Count; SLMcount++) { if (OMCheckList.Items[SLMcount].Selected) { OMIds = OMIds + OMCheckList.Items[SLMcount].Value + ","; } } for (int SLMcount = 0; SLMcount < CheckBoxList2.Items.Count; SLMcount++) { if (CheckBoxList2.Items[SLMcount].Selected) { OMIds = OMIds + CheckBoxList2.Items[SLMcount].Value + ","; } } if (OMIds.Length > 0) { OMIds = OMIds.Substring(0, OMIds.Length - 1); SLrepo.UpdateAfterDeleteServiceLine(ServLineId, OMIds); Response.Redirect("~/SLMServiceLines.aspx"); } else { Label1.Text = "Please Select atleast one operartional manager"; } //SLrepo.EditServiceLine(ServLineId, OMIds); }