protected void btnsubmit_Click(object sender, EventArgs e) { try { string dt = System.DateTime.Now.ToString("dd'/'MM'/'yyyy hh:mm tt"); //string centercode = "C"; string centercode = Session["CenterCode"].ToString(); BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager(); Entities.RTOCounter entObj = new Entities.RTOCounter(); int chkcountlist = accMgr.AdminVerifyCounterBLL(txtcountername.Text, txtdevicecode.Text, centercode); if (chkcountlist == 0) { entObj = accMgr.CounterAddBLL(txtcountername.Text, txtdevicecode.Text, centercode); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Saved Successfully');", true); txtcountername.Text = ""; txtdevicecode.Text = ""; txtcountername.Focus(); } else { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Something Went Wrong!!!!!!!!!!!!');", true); } return; } catch (Exception ex) { throw ex; } }
public Entities.RTOCounter CounterUpdateBLL(string txtcountername, string txtdevicecode, string dt, int id, string centercode) { DataAccessLayer.RTOAdmin.RTOCounterStaffServiceDAO accDAO1 = new DataAccessLayer.RTOAdmin.RTOCounterStaffServiceDAO(); Entities.RTOCounter entObj1 = new Entities.RTOCounter(); entObj1 = accDAO1.CounterUpdateDAL(txtcountername, txtdevicecode, dt, id, centercode); return(entObj1); }
public System.Data.DataTable FillCounterBLL(string centercode) { DataAccessLayer.RTOAdmin.RTOCounterStaffServiceDAO accDAO1 = new DataAccessLayer.RTOAdmin.RTOCounterStaffServiceDAO(); Entities.RTOCounter entObj1 = new Entities.RTOCounter(); System.Data.DataTable dt1 = new System.Data.DataTable(); dt1 = accDAO1.FillCounterDAL(centercode); return(dt1); }
public static string getAllCounterDetails() { BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager(); Entities.RTOCounter entObj = new Entities.RTOCounter(); DataTable dt = new DataTable(); string centercode = HttpContext.Current.Session["CenterCode"].ToString(); //string centercode = Session["CenterCode"].ToString(); dt = accMgr.displayCounterBLL(centercode); string JSONString = string.Empty; JSONString = JsonConvert.SerializeObject(dt); return(JSONString); }
public void FillCountername() { try { BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager(); Entities.RTOCounter entObj = new Entities.RTOCounter(); DataTable dt = new DataTable(); string centercode = Session["CenterCode"].ToString(); dt = accMgr.FillCounterBLL(centercode); if (dt.Rows.Count > 0) { ddlCounteName.DataSource = dt; ddlCounteName.DataTextField = "CounterName_VCR"; ddlCounteName.DataValueField = "CounterID_INT"; ddlCounteName.DataBind(); ddlCounteName.Items.Insert(0, new ListItem("Select A Counter", "0")); } else { } } catch { } }
protected void btnupdate_Click(object sender, EventArgs e) { try { string dt = System.DateTime.Now.ToString("dd'/'MM'/'yyyy hh:mm tt"); BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager accMgr = new BusinessLayer.RTOAdmin.RTOCounterStaffServiceManager(); Entities.RTOCounter entObj = new Entities.RTOCounter(); int id = Convert.ToInt32(hidden1.Value); string centercode = Session["CenterCode"].ToString(); entObj = accMgr.CounterUpdateBLL(txtcountername.Text, txtdevicecode.Text, dt, id, centercode); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Updated Successfully');", true); txtcountername.Text = ""; txtdevicecode.Text = ""; txtcountername.Focus(); btnsubmit.Visible = true; } catch (Exception ex) { throw ex; } }