Ejemplo n.º 1
0
    protected void Bind_CrewEvaluationResults()
    {
        int CrewID = 0;

        if (Request.QueryString["CrewID"] != null)
        {
            CrewID = UDFLib.ConvertToInteger(Request.QueryString["CrewID"].ToString());
        }
        int Year = DateTime.Today.Year;

        DataTable dt = BLL_Crew_Evaluation.Get_CrewEvaluationResults(CrewID, Year);

        DataView dataView = new DataView(dt);

        try
        {
            if (ViewState["sortExpression"] != null)
            {
                dataView.Sort = ViewState["sortExpression"].ToString();
            }
        }
        catch { }

        GridView_Evaluation.DataSource = dataView;
        GridView_Evaluation.DataBind();

        Enable_Evaluation();
    }
Ejemplo n.º 2
0
    protected void lnkAddToEvaluation_Click(object sender, EventArgs e)
    {
        int Evaluation_ID = UDFLib.ConvertToInteger(Request.QueryString["EID"].ToString());

        foreach (GridViewRow row in GridView_UnAssignedCriteria.Rows)
        {
            CheckBox chkSelect   = (CheckBox)row.FindControl("chkSelect");
            int      Criteria_ID = UDFLib.ConvertToInteger(GridView_UnAssignedCriteria.DataKeys[row.RowIndex].Value.ToString());

            if (chkSelect != null)
            {
                if (chkSelect.Checked == true)
                {
                    DataTable dtOptionValue = new DataTable();
                    dtOptionValue.Columns.Add(new DataColumn("OptionText", typeof(string)));
                    CheckBoxList chk = (CheckBoxList)row.FindControl("chkOptions");
                    foreach (ListItem chki in chk.Items)
                    {
                        if (chki.Selected == true)
                        {
                            dtOptionValue.Rows.Add(chki.Text);
                        }
                    }
                    BLL_Crew_Evaluation.Add_MandatoryGrades_ToEvaluation(Criteria_ID, Evaluation_ID, GetSessionUserID(), dtOptionValue);
                    BLL_Crew_Evaluation.Add_Criteria_ToEvaluation(Criteria_ID, Evaluation_ID, GetSessionUserID());
                }
            }
        }
        Bind_AssignedCriteria();
        Bind_UnAssignedCriteria();
    }
Ejemplo n.º 3
0
    protected void Load_CategoryList()
    {
        DataTable dt = BLL_Crew_Evaluation.Get_CategoryList(txtfilter.Text);

        GridView_Category.DataSource = dt;
        GridView_Category.DataBind();
    }
Ejemplo n.º 4
0
    protected void GridView_Category_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int ID = UDFLib.ConvertToInteger(GridView_Category.DataKeys[e.RowIndex].Value.ToString());

        BLL_Crew_Evaluation.DELETE_Category(ID, GetSessionUserID());
        Load_CategoryList();
    }
Ejemplo n.º 5
0
    protected void GridView_UnAssignedCriteria_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                int ID         = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "Grading_Type").ToString());
                int Grade_Type = UDFLib.ConvertToInteger(DataBinder.Eval(e.Row.DataItem, "Grade_Type").ToString());

                CheckBoxList rdo = (CheckBoxList)e.Row.FindControl("chkOptions");
                DataTable    dt  = BLL_Crew_Evaluation.Get_GradingOptions(ID);


                rdo.DataSource = dt;
                rdo.DataBind();

                if (Grade_Type == 2)
                {
                    TextBox txtAnswer = new TextBox();
                    txtAnswer.Text    = "Subjective Type";
                    txtAnswer.Enabled = false;
                    e.Row.Cells[3].Controls.Add(txtAnswer);
                }
            }
        }
        catch
        {
        }
    }
Ejemplo n.º 6
0
    protected void GridView_AssignedCriteria_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        int         Evaluation_ID    = UDFLib.ConvertToInteger(Request.QueryString["EID"].ToString());
        int         Criteria_ID      = 0;
        GridViewRow r                = (GridViewRow)((ImageButton)e.CommandSource).Parent.Parent;
        int         SelectedRowIndex = r.RowIndex;

        if (e.CommandName == "MoveUp")
        {
            Criteria_ID = int.Parse(e.CommandArgument.ToString());
            BLL_Crew_Evaluation.Swap_Criteria_Sort_Order(Evaluation_ID, Criteria_ID, 1);
            if (SelectedRowIndex >= 1)
            {
                SelectedRowIndex -= 1;
            }
        }
        else if (e.CommandName == "MoveDown")
        {
            Criteria_ID = int.Parse(e.CommandArgument.ToString());
            BLL_Crew_Evaluation.Swap_Criteria_Sort_Order(Evaluation_ID, Criteria_ID, -1);
            if (SelectedRowIndex < GridView_AssignedCriteria.Rows.Count - 1)
            {
                SelectedRowIndex += 1;
            }
        }

        Bind_AssignedCriteria();
        GridView_AssignedCriteria.SelectedIndex = SelectedRowIndex;
    }
Ejemplo n.º 7
0
    protected void GridView_Criteria_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int ID = UDFLib.ConvertToInteger(GridView_Criteria.DataKeys[e.RowIndex].Value.ToString());

        BLL_Crew_Evaluation.DELETE_Criteria(ID, GetSessionUserID());
        Bind_QuestionBank();
    }
Ejemplo n.º 8
0
    protected void Load_TypeList()
    {
        DataTable dt = BLL_Crew_Evaluation.Get_EvaluationTypeList();

        GridView_EvaluationType.DataSource = dt;
        GridView_EvaluationType.DataBind();
    }
Ejemplo n.º 9
0
    protected void btnAddFeedback_Click(object sender, EventArgs e)
    {
        lblerrmsg.Text = "";
        int FeedbackCategory_ID = Convert.ToInt32(ddlFeedbackCategory_Add.SelectedValue);

        if (txtFeedback.Text.Trim() != "" && FeedbackCategory_ID > 0)
        {
            int Crew_ID = UDFLib.ConvertToInteger(Request.QueryString["Crew_ID"].ToString());

            string Evaluation_ID     = Request.QueryString["Evaluation_ID"].ToString();
            string Month             = Request.QueryString["Month"].ToString();
            string Schedule_ID       = Request.QueryString["Schedule_ID"].ToString();
            int    Dtl_Evaluation_ID = UDFLib.ConvertToInteger(Request.QueryString["ID"].ToString());
            int    Vessel_ID         = UDFLib.ConvertToInteger(Request.QueryString["Vessel_ID"].ToString());
            int    Office_ID         = UDFLib.ConvertToInteger(Request.QueryString["Office_ID"].ToString());

            BLL_Crew_Evaluation.INS_CrewEvaluationFeedback(null, Crew_ID, txtFeedback.Text.Trim(), GetSessionUserID(), Evaluation_ID, Month, Schedule_ID, Dtl_Evaluation_ID, Vessel_ID, Office_ID, FeedbackCategory_ID);
            txtFeedback.Text = "";

            string js = "alert('Feedback Saved');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "status", js, true);
        }
        else
        {
            if (txtFeedback.Text.Trim() == "")
            {
                lblerrmsg.Text = "**Feedback cannot be empty.";
            }
            else
            {
                lblerrmsg.Text = "**Feedback Action is mandatory.";
            }
        }
        Load_CrewEvaluationFeedbackRequest();
    }
Ejemplo n.º 10
0
    protected void brnVerifySave(object sender, EventArgs e)
    {
        string js;

        try
        {
            int Office_ID = UDFLib.ConvertToInteger(hdnOffice_ID.Value.ToString());
            int Vessel_ID = UDFLib.ConvertToInteger(Convert.ToInt32(hdnVessel_ID.Value.ToString()));
            if (txtMessage.Text.Trim().Length == 0)
            {
                js = "alert('Verification comment is mandatory!');";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "js", js, true);
                return;
            }

            txtMessage.ReadOnly = true;
            int CrewID            = UDFLib.ConvertToInteger(Request.QueryString["CrewID"].ToString());
            int Dtl_Evaluation_ID = UDFLib.ConvertToInteger(Request.QueryString["DtlID"].ToString());
            int VerifiedBy        = int.Parse(Session["USERID"].ToString());
            BLL_Crew_Evaluation.Update_CrewEvaluation_Verification(CrewID, Dtl_Evaluation_ID, Office_ID, Vessel_ID, VerifiedBy, txtMessage.Text);
            //btnVerify.Enabled = false;

            txtMessage.Enabled = false;
            btnSaveFollowUpAndClose.Enabled = false;
            //LoadFollowUps(iJob_OfficeID, VESSEL_ID, Worklist_ID);
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
Ejemplo n.º 11
0
    protected void Load_CrewEvaluationFeedbackRequest()
    {
        try
        {
            string btnColor  = "";
            int    ID        = UDFLib.ConvertToInteger(Request.QueryString["ID"].ToString());
            int    Vessel_ID = UDFLib.ConvertToInteger(Request.QueryString["Vessel_ID"].ToString());
            int    Office_ID = UDFLib.ConvertToInteger(Request.QueryString["Office_ID"].ToString());

            DataTable dt = BLL_Crew_Evaluation.Get_CrewEvaluationFeedbackRequest_Details(ID, Vessel_ID, Office_ID);

            GridView_CrewEvaluationFeedbackRequest.DataSource = dt;
            GridView_CrewEvaluationFeedbackRequest.DataBind();

            if (BLL_Crew_Evaluation.Get_CrewEvaluation_FeedbackCount(GetSessionUserID(), Convert.ToInt32(ID), Convert.ToInt32(Office_ID), Convert.ToInt32(Vessel_ID)) > 0)
            {
                btnColor = "yellow";
            }

            string Show_Dashboard1 = String.Format("try{{OpenFeedback();parent.AsyncFeedbackHistory();parent.ChangeBtnColor('" + btnColor + "');}}catch(exp){{}}");
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", Show_Dashboard1, true);
        }
        catch (Exception ex)
        {
        }
    }
Ejemplo n.º 12
0
    protected void Bind_EvaluationResult()
    {
        int CrewID            = UDFLib.ConvertToInteger(Request.QueryString["CrewID"].ToString());
        int Evaluation_ID     = UDFLib.ConvertToInteger(Request.QueryString["EID"].ToString());
        int Month             = UDFLib.ConvertToInteger(Request.QueryString["M"].ToString());
        int Dtl_Evaluation_ID = UDFLib.ConvertToInteger(Request.QueryString["DtlID"].ToString());

        DataTable dt = BLL_Crew_Evaluation.Get_CrewEvaluation_Details(CrewID, Dtl_Evaluation_ID);;

        DataView dataView = new DataView(dt);

        if (ViewState["sortExpression"] != null)
        {
            dataView.Sort = ViewState["sortExpression"].ToString();
        }

        GridView_AssignedCriteria.DataSource = dataView;
        GridView_AssignedCriteria.DataBind();

        if (dt.Rows.Count > 0)
        {
            hdnOffice_ID.Value = dt.Rows[0]["Office_ID"].ToString();
            hdnVessel_ID.Value = dt.Rows[0]["Vessel_ID"].ToString();
            string rank      = dt.Rows[0]["Rank_Short_Name"].ToString() == "" ? "" : dt.Rows[0]["Rank_Short_Name"].ToString() + "-";
            string staffCode = dt.Rows[0]["Staff_Code"].ToString() == "" ? "" : dt.Rows[0]["Staff_Code"].ToString() + "-";
            lnkEvaluator.Text        = rank + staffCode + dt.Rows[0]["Evaluator"].ToString();
            lnkEvaluator.NavigateUrl = "~/Crew/CrewDetails.aspx?ID=" + dt.Rows[0]["Evaluator_CrewDtlID"].ToString();
            txtEvaDate.Text          = Convert.ToDateTime(dt.Rows[0]["Evaluation_Date"].ToString()).ToString(Convert.ToString(Session["User_DateFormat"]));
            txtEvaDate.Enabled       = false;
            EvalLibRank         = rank;
            Evaluator_CrewDtlID = dt.Rows[0]["Evaluator_CrewDtlID"].ToString();
        }
    }
Ejemplo n.º 13
0
    protected void onSave(object source, CommandEventArgs e)
    {
        if (e.CommandArgument.ToString() != "")
        {
            string[] commandArgs      = e.CommandArgument.ToString().Split(new char[] { ',' });
            int      ID               = Convert.ToInt32(commandArgs[0]);
            int      index            = Convert.ToInt32(commandArgs[1]);
            string   Remarks          = (GridView_CrewEvaluationFeedbackRequest.Rows[index].Cells[5].FindControl("txtRemark") as TextBox).Text.Trim();
            int      Feedbackcategory = int.Parse((GridView_CrewEvaluationFeedbackRequest.Rows[index].Cells[6].FindControl("ddlFeedbackCategory_Feedback") as DropDownList).SelectedValue);
            if (Remarks != "" && Feedbackcategory > 0)
            {
                int Crew_ID = UDFLib.ConvertToInteger(Request.QueryString["Crew_ID"].ToString());

                string Evaluation_ID = Request.QueryString["Evaluation_ID"].ToString();
                string Month         = Request.QueryString["Month"].ToString();
                string Schedule_ID   = Request.QueryString["Schedule_ID"].ToString();

                BLL_Crew_Evaluation.INS_CrewEvaluationFeedback(ID, Crew_ID, Remarks, GetSessionUserID(), Evaluation_ID, Month, Schedule_ID, null, null, null, Feedbackcategory);
                Load_CrewEvaluationFeedbackRequest();
            }
            else
            {
                string js1;
                if (Remarks == "")
                {
                    js1 = "alert('Feedback cannot be blank!');";
                }
                else
                {
                    js1 = "alert('Please select Feedback Action!');";
                }
                ScriptManager.RegisterStartupScript(this, this.GetType(), "status", js1, true);
            }
        }
    }
Ejemplo n.º 14
0
    protected void GridView_Selected_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int RankID        = UDFLib.ConvertToInteger(GridView_Selected.DataKeys[e.RowIndex].Value.ToString());
        int Evaluation_ID = UDFLib.ConvertToInteger(ddlEvaluations.SelectedValue);

        if (RankID > 0)
        {
            foreach (ListItem liMon in lstSelectedMonth.Items)
            {
                BLL_Crew_Evaluation.UPDATE_EvaluationMonths(Evaluation_ID, RankID, UDFLib.ConvertToInteger(liMon.Value), 0, GetSessionUserID());
            }
            foreach (ListItem liRule in lstSelectedRules.Items)
            {
                BLL_Crew_Evaluation.UPDATE_EvaluationRules(Evaluation_ID, RankID, UDFLib.ConvertToInteger(liRule.Value), 0, GetSessionUserID());
            }

            string js = "alert('Evaluation Planned Updated');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "alert2", js, true);


            Bind_Evaluation_Ranks(Evaluation_ID);

            if (GridView_Selected.Rows.Count > 0)
            {
                GridView_Selected.SelectedIndex = 1;
                RankID = UDFLib.ConvertToInteger(GridView_Selected.SelectedValue);
                Load_MonthsAndRules_ForRank(RankID);
            }
        }
    }
Ejemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CalendarExtendertxtDueDate.Format = Convert.ToString(Session["User_DateFormat"]);

        TodayDateFormat = UDFLib.DateFormatMessage();
        if (Session["USERFULLNAME"] == null)
        {
            Response.Redirect("~/Account/Login.aspx");
        }

        if (!IsPostBack)
        {
            DataTable dt = objUser.Get_UserList(Convert.ToInt32(Session["USERCOMPANYID"]));

            ddlFeedbackFrom.DataSource     = dt;
            ddlFeedbackFrom.DataTextField  = "USERNAME";
            ddlFeedbackFrom.DataValueField = "UserID";
            ddlFeedbackFrom.DataBind();
            ddlFeedbackFrom.Items.Insert(0, new ListItem("-Select-", "0"));


            DataTable dt1 = BLL_Crew_Evaluation.Get_FeedbackCategories();

            ddlFeedbackCategory_Add.DataSource     = dt1;
            ddlFeedbackCategory_Add.DataTextField  = "CATEGORY";
            ddlFeedbackCategory_Add.DataValueField = "ID";
            ddlFeedbackCategory_Add.DataBind();

            lblName.Text = Session["USERFULLNAME"].ToString();
            lblDate.Text = DateTime.Now.ToString(Convert.ToString(Session["User_DateFormat"]));

            Load_CrewEvaluationFeedbackRequest();
        }
    }
Ejemplo n.º 16
0
    protected void Load_GradingList()
    {
        DataTable dt = BLL_Crew_Evaluation.Get_GradingList();

        GridView_Grading.DataSource = dt;
        GridView_Grading.DataBind();
    }
Ejemplo n.º 17
0
    protected void btnSaveAndCloseSchedule_Click(object sender, EventArgs e)
    {
        int Evaluation_ID = UDFLib.ConvertToInteger(ddlEvaluations.SelectedValue);
        int RankID        = (GridView_NotSelected.SelectedIndex >= 0) ? UDFLib.ConvertToInteger(GridView_NotSelected.SelectedValue) : UDFLib.ConvertToInteger(GridView_Selected.SelectedValue);

        int Ret = Update_Evaluation_Planning();

        if (Ret == 1)
        {
            int chkStatus = 0;
            if (chkOffice.Checked == true)
            {
                chkStatus = 1;
                BLL_Crew_Evaluation.INSERT_EvaluationLocation(Evaluation_ID, UDFLib.ConvertToInteger(ddlEvaluator.SelectedValue), UDFLib.ConvertToInteger(txtNotify.Text), GetSessionUserID(), chkStatus);
            }
            else
            {
                chkStatus = 0;
                BLL_Crew_Evaluation.INSERT_EvaluationLocation(Evaluation_ID, -1, UDFLib.ConvertToInteger(txtNotify.Text), GetSessionUserID(), chkStatus);
            }

            string js = "alert('Evaluation Planning Updated.');closeDiv('dvEvaluationScheduling');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "SaveAndClose", js, true);
        }
    }
Ejemplo n.º 18
0
    protected void ddlGradingType_SelectedIndexChanged(object sender, EventArgs e)
    {
        int       Grade_ID = UDFLib.ConvertToInteger(ddlGradingType.SelectedValue);
        DataTable dt       = BLL_Crew_Evaluation.Get_GradingOptions(Grade_ID);

        rdoGradings.DataSource = dt;
        rdoGradings.DataBind();
    }
Ejemplo n.º 19
0
    protected void Load_Gradings()
    {
        DataTable dt = BLL_Crew_Evaluation.Get_GradingList();

        ddlGradingType.DataSource = dt;
        ddlGradingType.DataBind();
        ddlGradingType.Items.Insert(0, new ListItem("-Select-", "0"));
    }
Ejemplo n.º 20
0
    protected void btnsave_Click(object sender, EventArgs e)
    {
        int ID = BLL_Crew_Evaluation.INSERT_Criteria(txtCriteria.Text.Trim(), UDFLib.ConvertToInteger(ddlCatName.SelectedValue), UDFLib.ConvertToInteger(ddlGradingType.SelectedValue), GetSessionUserID());

        txtCriteria.Text = "";
        txtfilter.Text   = "";
        Bind_QuestionBank();
    }
Ejemplo n.º 21
0
    protected void btnsave_Click(object sender, EventArgs e)
    {
        int ID = BLL_Crew_Evaluation.INSERT_Category(txtCatName.Text.Trim(), GetSessionUserID());

        txtCatName.Text = "";
        txtfilter.Text  = "";
        Load_CategoryList();
    }
Ejemplo n.º 22
0
    protected void btnSaveEvaType_Click(object sender, EventArgs e)
    {
        int ID = BLL_Crew_Evaluation.INSERT_EvaluationType(txtEvaluationType.Text.Trim(), GetSessionUserID());

        txtEvaluationType.Text = "";

        Load_TypeList();
    }
Ejemplo n.º 23
0
    protected void GridView_AssignedCriteria_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        int ID            = UDFLib.ConvertToInteger(GridView_AssignedCriteria.DataKeys[e.RowIndex].Value.ToString());
        int Evaluation_ID = UDFLib.ConvertToInteger(Request.QueryString["EID"].ToString());

        BLL_Crew_Evaluation.Remove_Criteria_FromEvaluation(ID, Evaluation_ID, GetSessionUserID());
        Bind_AssignedCriteria();
        Bind_UnAssignedCriteria();
    }
Ejemplo n.º 24
0
    protected void GridView_Category_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        int    ID            = UDFLib.ConvertToInteger(GridView_Category.DataKeys[e.RowIndex].Value.ToString());
        string Category_Name = e.NewValues["Category_Name"].ToString();

        BLL_Crew_Evaluation.UPDATE_Category(ID, Category_Name, GetSessionUserID());
        GridView_Category.EditIndex = -1;
        Load_CategoryList();
    }
Ejemplo n.º 25
0
    protected void GridView_EvaluationType_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        int    ID = UDFLib.ConvertToInteger(GridView_EvaluationType.DataKeys[e.RowIndex].Value.ToString());
        string Evaluation_Type = e.NewValues["Evaluation_Type"].ToString();

        BLL_Crew_Evaluation.UPDATE_EvaluationType(ID, Evaluation_Type, GetSessionUserID());
        GridView_EvaluationType.EditIndex = -1;
        Load_TypeList();
    }
Ejemplo n.º 26
0
    protected void btnsave_Click(object sender, EventArgs e)
    {
        int Evaluation_ID = BLL_Crew_Evaluation.INSERT_Evaluation(txtEvaluation_Name.Text.Trim(), GetSessionUserID());

        string js = "alert('Evaluation Planned.');";

        ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", js, true);

        Bind_Evaluations();
    }
Ejemplo n.º 27
0
    protected void btnPlanEvaluationForMaster_Click(object sender, EventArgs e)
    {
        try
        {
            if (GridView_Evaluation.Rows.Count > 0)
            {
                if (txtEvaDueDate.Text.Trim() != "")
                {
                    int       CrewID = UDFLib.ConvertToInteger(Request.QueryString["CrewID"].ToString());
                    DataTable dt     = objBLLCrew.Get_CrewVoyages(CrewID, 0, GetSessionUserID());
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        if (dt.Rows[0]["Sign_On_Date"].ToString() != "")
                        {
                            int Res = BLL_Crew_Evaluation.Plan_Crew_Evaluation_Adhoc(CrewID, UDFLib.ConvertToInteger(ddlEvaluations.SelectedValue), UDFLib.ConvertToDate(txtEvaDueDate.Text.Trim()).ToString(), GetSessionUserID());

                            string js = "";
                            if (Res == -1)
                            {
                                js = "alert('There is another evaluation already planned for this date.');";
                            }
                            if (Res == -2)
                            {
                                js = "alert('There is no voyage found for this staff.');";
                            }
                            if (Res > 0)
                            {
                                js = "alert('Evaluation Planned.');parent.hideModal('dvPopupFrame');";
                            }
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "script1", js, true);
                        }
                        else
                        {
                            string js = "alert('Evaluation cannot be planned as  crew is not onboard.');parent.hideModal('dvPopupFrame');";
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "script1", js, true);
                        }
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "script1", "alert('Select due date.');", true);
                }
            }
            else
            {
                string js = "alert('There is no evaluator on Vessel.Evaluation cannot be planned now.');";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "script1", js, true);
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
Ejemplo n.º 28
0
    private int Update_Evaluation_Planning()
    {
        int Evaluation_ID = UDFLib.ConvertToInteger(ddlEvaluations.SelectedValue);
        int RankID        = (GridView_NotSelected.SelectedIndex >= 0) ? UDFLib.ConvertToInteger(GridView_NotSelected.SelectedValue) : UDFLib.ConvertToInteger(GridView_Selected.SelectedValue);

        int SelectedMonthCount = 0;
        int SelectedRulesCount = 0;
        int ReturnValue        = 0;

        if (RankID > 0)
        {
            foreach (ListItem liMon in lstSelectedMonth.Items)
            {
                if (liMon.Selected == true)
                {
                    BLL_Crew_Evaluation.UPDATE_EvaluationMonths(Evaluation_ID, RankID, UDFLib.ConvertToInteger(liMon.Value), 1, GetSessionUserID());
                    SelectedMonthCount++;
                }
                else
                {
                    BLL_Crew_Evaluation.UPDATE_EvaluationMonths(Evaluation_ID, RankID, UDFLib.ConvertToInteger(liMon.Value), 0, GetSessionUserID());
                }
            }
            foreach (ListItem liRule in lstSelectedRules.Items)
            {
                if (liRule.Selected == true)
                {
                    BLL_Crew_Evaluation.UPDATE_EvaluationRules(Evaluation_ID, RankID, UDFLib.ConvertToInteger(liRule.Value), 1, GetSessionUserID());
                    SelectedRulesCount++;
                }
                else
                {
                    BLL_Crew_Evaluation.UPDATE_EvaluationRules(Evaluation_ID, RankID, UDFLib.ConvertToInteger(liRule.Value), 0, GetSessionUserID());
                }
            }

            if (SelectedMonthCount > 0 || SelectedRulesCount > 0)
            {
                ReturnValue = 1;
            }
            else
            {
                string js2 = "alert('Please select applicable month or rule.');";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alert2", js2, true);
            }
        }
        else
        {
            string js3 = "alert('Please select rank.');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "alert3", js3, true);
        }

        return(ReturnValue);
    }
Ejemplo n.º 29
0
    protected void btnSaveAndClose_Click(object sender, EventArgs e)
    {
        int ID = BLL_Crew_Evaluation.INSERT_Criteria(txtCriteria.Text.Trim(), UDFLib.ConvertToInteger(ddlCatName.SelectedValue), UDFLib.ConvertToInteger(ddlGradingType.SelectedValue), GetSessionUserID());

        txtCriteria.Text = "";
        txtfilter.Text   = "";
        Bind_UnAssignedCriteria();

        string js = "closeDivAddNewCriteria();";

        ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", js, true);
    }
Ejemplo n.º 30
0
    protected void Load_CategoryList()
    {
        DataTable dt = BLL_Crew_Evaluation.Get_CategoryList(txtfilter.Text);

        ddlCategory.DataSource = dt;
        ddlCategory.DataBind();
        ddlCategory.Items.Insert(0, new ListItem("-Select All-", "0"));


        ddlCatName.DataSource = dt;
        ddlCatName.DataBind();
    }