Esempio n. 1
0
 public void LoadGrid()
 {
     try
     {
         DataTable DT = new DataTable();
         _obj_Rec_Priority = new RECRUITMENT_INTERVIEW_PRIORITY();
         _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString());
         _obj_Rec_Priority.MODE = 1;
         DT = Recruitment_BLL.get_InterviewPriority(_obj_Rec_Priority);
         if (DT.Rows.Count != 0)
         {
             RG_InterviewPriority.DataSource = DT;
         }
         else
         {
             DataTable dt1 = new DataTable();
             RG_InterviewPriority.DataSource = dt1;
             return;
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_InterviewPriority", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
         return;
     }
 }
Esempio n. 2
0
    protected void lnk_Edit_Command(object sender, CommandEventArgs e)
    {
        try
        {
            //ClearControls();
            //   LoadGrade();

            _obj_Rec_Priority = new RECRUITMENT_INTERVIEW_PRIORITY();


            _obj_Rec_Priority.MODE        = 5;
            _obj_Rec_Priority.PRIORITY_ID = Convert.ToInt32(e.CommandArgument);
            priorityid = Convert.ToString(e.CommandArgument);
            DataTable DT = Recruitment_BLL.get_InterviewPriority(_obj_Rec_Priority);

            if (DT.Rows.Count != 0)
            {
                lbl_Id.Text = Convert.ToString(DT.Rows[0]["PRIORITY_ID"]);
                RNTB_PriorityValue.Value   = Convert.ToInt32(DT.Rows[0]["PRIORITY_VALUE"]);
                RNTB_PriorityValue.Enabled = false;
                txt_Priorityname.Text      = Convert.ToString(DT.Rows[0]["PRIORITY_NAME"]);
            }

            btn_Update.Visible = true;
            btn_Submit.Visible = false;
            RM_InterviewPriority.SelectedIndex = 1;
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_InterviewPriority", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }
Esempio n. 3
0
 protected void RG_InterviewPriority_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
 {
     try
     {
         DataTable DT = new DataTable();
         _obj_Rec_Priority = new RECRUITMENT_INTERVIEW_PRIORITY();
         _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString());
         _obj_Rec_Priority.MODE = 1;
         DT = Recruitment_BLL.get_InterviewPriority(_obj_Rec_Priority);
         if (DT.Rows.Count != 0)
         {
             RG_InterviewPriority.DataSource = DT;
             //  RG_InterviewPriority.DataBind();
         }
         //  LoadGrid();
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_InterviewPriority", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
         return;
     }
 }
Esempio n. 4
0
    protected void btn_Submit_Click(object sender, EventArgs e)
    {
        try
        {
            _obj_Rec_Priority = new RECRUITMENT_INTERVIEW_PRIORITY();
            _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString());


            switch (((Button)sender).ID.ToUpper())
            {
            case "BTN_UPDATE":
                _obj_Rec_Priority.PRIORITY_VALUE = Convert.ToInt32(RNTB_PriorityValue.Value);
                _obj_Rec_Priority.PRIORITY_NAME  = Recruitment_BLL.ReplaceQuote(Convert.ToString(txt_Priorityname.Text));
                _obj_Rec_Priority.PRIORITY_ID    = Convert.ToInt32(lbl_Id.Text);
                //   _obj_Rec_Priority.PRIORITY_ID = Convert.ToInt32(priorityid);
                _obj_Rec_Priority.MODE = 2;
                _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString());

                if (Convert.ToString(Recruitment_BLL.get_InterviewPriority(_obj_Rec_Priority).Rows[0]["Count"]) != "1")
                {
                    Recruitment_BLL.ShowMessage(this, "This Combination Already Exists");
                    return;
                }

                _obj_Rec_Priority.MODE = 3;

                if (Recruitment_BLL.set_InterviewPriority(_obj_Rec_Priority))
                {
                    Recruitment_BLL.ShowMessage(this, "Information Updated Successfully");
                }
                else
                {
                    Recruitment_BLL.ShowMessage(this, "Information Not Updated");
                }

                LoadGrid();
                RG_InterviewPriority.DataBind();
                RM_InterviewPriority.SelectedIndex = 0;

                break;

            case "BTN_SUBMIT":
                _obj_Rec_Priority.PRIORITY_VALUE          = Convert.ToInt32(RNTB_PriorityValue.Value);
                _obj_Rec_Priority.PRIORITY_NAME           = Recruitment_BLL.ReplaceQuote(Convert.ToString(txt_Priorityname.Text));
                _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString());
                _obj_Rec_Priority.MODE = 2;

                if (Convert.ToString(Recruitment_BLL.get_InterviewPriority(_obj_Rec_Priority).Rows[0]["Count"]) != "0")
                {
                    Recruitment_BLL.ShowMessage(this, "This Combination Already Exists");
                    return;
                }

                _obj_Rec_Priority.MODE = 4;

                if (Recruitment_BLL.set_InterviewPriority(_obj_Rec_Priority))
                {
                    Recruitment_BLL.ShowMessage(this, "Information Saved Successfully");
                }
                else
                {
                    Recruitment_BLL.ShowMessage(this, "Information Not Saved");
                }

                LoadGrid();
                RG_InterviewPriority.DataBind();
                RM_InterviewPriority.SelectedIndex = 0;

                break;

            default:
                break;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_InterviewPriority", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }