コード例 #1
0
 private void FillJobAlert()
 {
     beJobAlert.type = 1;
     ds = new DataSet();
     ds = bajob.GetJsJobAlertModify(beJobAlert);
     dlJobAlert.DataSource = ds.Tables[0];
     dlJobAlert.DataBind();
 }
コード例 #2
0
ファイル: JobAlert.aspx.cs プロジェクト: 5l1v3r1/Ploutus-1
 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)
         {
         }
     }
 }