public DataSet getFunctionalArea(BEEssentials beEss) { SqlParameter param = new SqlParameter("@id", SqlDbType.Int); param.Value = Convert.ToInt32(beEss.catagory); return(SqlHelper.ExecuteDataset(connectionString, CommandType.StoredProcedure, "spsGetFunctionalArea", param)); }
protected void ddlFunctionalArea_SelectedIndexChanged(object sender, EventArgs e) { beEss = new BEEssentials(); beEss.catagory = ddlCategory.SelectedValue.ToString(); ddlFunctionalArea.DataSource = baEss.getFunctionalAreas(beEss); ddlFunctionalArea.DataValueField = "funid"; ddlFunctionalArea.DataTextField = "FuncArea"; ddlFunctionalArea.DataBind(); ddlFunctionalArea.Items.Insert(0, new ListItem("Select", "Select")); }
protected void dlJobAlerts_RowCommand(object sender, GridViewCommandEventArgs e) { //lblmsg.Text = string.Empty; if (e.CommandName.ToString() == "Edit") { try { BEJobAlerts bejob = new BEJobAlerts(); BA_JobAlerts baJob = new BA_JobAlerts(); beEss = new BEEssentials(); ddlCategoryEdit.DataSource = baEss.getCategories(); ddlCategoryEdit.DataValueField = "CategoryID"; ddlCategoryEdit.DataTextField = "CategoryName"; ddlCategoryEdit.DataBind(); ddlCategoryEdit.Items.Insert(0, new ListItem("Select", "Select")); bejob.id = int.Parse(e.CommandArgument.ToString()); ViewState["JobId"] = int.Parse(e.CommandArgument.ToString()); bejob.type = 1; ds = new DataSet(); ds = baJob.GetJsJobAlertModify(bejob); txtKeyword.Text = ds.Tables[0].Rows[0]["Keywords"].ToString(); ddlStateEdit.SelectedValue = ds.Tables[0].Rows[0]["Location"].ToString(); ddlCategoryEdit.SelectedValue = ds.Tables[0].Rows[0]["CategoryID"].ToString(); beEss.catagory = ddlCategoryEdit.SelectedValue.ToString(); ddlFuncAreaEdit.DataSource = baEss.getFunctionalAreas(beEss); ddlFuncAreaEdit.DataValueField = "funid"; ddlFuncAreaEdit.DataTextField = "FuncArea"; ddlFuncAreaEdit.DataBind(); ddlFuncAreaEdit.Items.Insert(0, new ListItem("Select", "Select")); ddlFuncAreaEdit.SelectedValue = ds.Tables[0].Rows[0]["funid"].ToString(); ddlExpFrom.SelectedValue = ds.Tables[0].Rows[0]["YearsExp"].ToString(); ddlExpTo.SelectedValue = ds.Tables[0].Rows[0]["MonthsExp"].ToString(); modalEdit.Show(); } catch (Exception ex) { } } if (e.CommandName.ToString() == "Delete") { try { BEJobAlerts bejob = new BEJobAlerts(); BA_JobAlerts baJob = new BA_JobAlerts(); bejob.id = int.Parse(e.CommandArgument.ToString()); string result = baJob.DeleteJsJobAlert(bejob); if (result == "Success") { lblmsg.Text = "Job ALert deleted"; GetJobs(); } else { lblmsg.Text = "Job ALert not deleted"; } } catch (Exception ex1) { } } if (e.CommandName.ToString() == "View") { try { BEJobAlerts bejob = new BEJobAlerts(); BA_JobAlerts baJob = new BA_JobAlerts(); bejob.id = int.Parse(e.CommandArgument.ToString()); bejob.type = 1; ViewState["JobId"] = int.Parse(e.CommandArgument.ToString()); ds = new DataSet(); ds = baJob.GetJsJobAlertModify(bejob); dlistJobAlertView.DataSource = ds.Tables[0]; dlistJobAlertView.DataBind(); modalViewAlert.Show(); } catch (Exception exe) { } } }
public DataSet getFunctionalAreas(BEEssentials beEss) { return(daEss.getFunctionalArea(beEss)); }