示例#1
0
    protected void btnSaveFollowUpAndClose_OnClick(object sender, EventArgs e)
    {
        try
        {
            int iJob_OfficeID = int.Parse(hdnOfficeID.Value);
            int Worklist_ID   = int.Parse(hdnWorklistlID.Value);
            int VESSEL_ID     = int.Parse(hdnVesselID.Value);

            string FOLLOWUP   = txtMessage.Text;
            int    CREATED_BY = int.Parse(Session["USERID"].ToString());
            int    TOSYNC     = 1;

            int newFollowupID = objBLL.Insert_Followup(iJob_OfficeID, Worklist_ID, VESSEL_ID, FOLLOWUP, CREATED_BY, TOSYNC);

            string strCommand = "";
            strCommand = Session["strQuery"].ToString();

            DataTable dtSearchResult = objBLL.Get_FilterWorklist(strCommand).Tables[0];

            rpt1.DataSource = dtSearchResult;
            rpt1.DataBind();
        }
        catch (Exception ex)
        {
            string js = "alert('Error in saving data!! Error: " + ex.Message + "');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "errorsaving", js, true);
        }
    }
示例#2
0
    protected void btnSaveFollowUpAndClose_OnClick(object sender, EventArgs e)
    {
        try
        {
            if (txtMessage.Text.Trim().Length == 0)
            {
                string OpenFollowupDiv = "alert('Message description is mandatory field.');OpenFollowupDiv();";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "OpenFollowupDiv", OpenFollowupDiv, true);
                return;
            }

            int iJob_OfficeID = int.Parse(hdnOfficeID.Value);
            int Worklist_ID   = int.Parse(hdnWorklistlID.Value);
            int VESSEL_ID     = int.Parse(hdnVesselID.Value);

            string FOLLOWUP   = txtMessage.Text;
            int    CREATED_BY = int.Parse(Session["USERID"].ToString());
            int    TOSYNC     = 1;

            int newFollowupID = objBLL.Insert_Followup(iJob_OfficeID, Worklist_ID, VESSEL_ID, FOLLOWUP, CREATED_BY, TOSYNC);

            DataTable dtpkid = (DataTable)Session["WORKLIST_PKID_NAV"];

            if (dtpkid != null)
            {
                fillvalue(dtpkid.Rows.Find(new object[] { Worklist_ID, VESSEL_ID, iJob_OfficeID }));
            }
            else
            {
                dtpkid = new DataTable();
                dtpkid.Columns.Add("WORKLIST_ID", typeof(string));
                dtpkid.Columns.Add("VESSEL_ID", typeof(string));
                dtpkid.Columns.Add("OFFICE_ID", typeof(string));

                dtpkid.Rows.Add(new object[] { Worklist_ID, VESSEL_ID, iJob_OfficeID });
                dtpkid.PrimaryKey = new DataColumn[] { dtpkid.Columns["WORKLIST_ID"], dtpkid.Columns["VESSEL_ID"], dtpkid.Columns["OFFICE_ID"] };

                fillvalue(dtpkid.Rows.Find(new object[] { Worklist_ID, VESSEL_ID, iJob_OfficeID }));
            }
            txtMessage.Text = ""; /// Added by Anjali DT:17-May-2016 JIT:9604 || To clear fields after adding follow up.
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }
示例#3
0
    protected void btnSaveFollowUpAndClose_OnClick(object sender, EventArgs e)
    {
        try
        {
            int iJob_OfficeID = int.Parse(hdnOfficeID.Value);
            int Worklist_ID   = int.Parse(hdnWorklistlID.Value);
            int VESSEL_ID     = int.Parse(hdnVesselID.Value);

            string FOLLOWUP   = txtMessage.Text;
            int    CREATED_BY = int.Parse(Session["USERID"].ToString());
            int    TOSYNC     = 1;

            int newFollowupID = objBLL.Insert_Followup(iJob_OfficeID, Worklist_ID, VESSEL_ID, FOLLOWUP, CREATED_BY, TOSYNC);

            //LoadFollowUps(iJob_OfficeID, VESSEL_ID, Worklist_ID);
        }
        catch (Exception ex)
        {
            string js = "alert('Error in saving data!! Error: " + ex.Message + "');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "errorsaving", js, true);
        }
    }