예제 #1
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();
    }
예제 #2
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);
            }
        }
    }