protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { Model_JobFunctionGroup cGroup = new Model_JobFunctionGroup(); dropGroup.DataSource = cGroup.GetAll(); dropGroup.DataTextField = "Title"; dropGroup.DataValueField = "JGID"; dropGroup.DataBind(); if (!string.IsNullOrEmpty(Request.QueryString["g"])) { add_section.Visible = true; int id = int.Parse(Request.QueryString["g"]); Model_Jobfunction cf = new Model_Jobfunction(); cf = cf.GetByID(id); JobID.Text = cf.JFID.ToString(); rname.Text = cf.Title; status.SelectedValue = cf.Status.ToString(); dropGroup.SelectedValue = cf.JGID.ToString(); txtintro.Text = cf.DesInto; txtdes1.Text = cf.Des1; txtdes2.Text = cf.Des2; txtdes3.Text = cf.Des3; txtdes4.Text = cf.Des4; txtdes5.Text = cf.Des5; headsection_pan.InnerHtml = "Edit"; } } }
public static void JobFucntionGroup(Model_JobFunctionGroup parameters) { Model_JobFunctionGroup cgroup = new Model_JobFunctionGroup(); List <Model_JobFunctionGroup> ret = cgroup.GetAll(); AppTools.SendResponse(HttpContext.Current.Response, ret.ObjectToJSON()); }