Ejemplo n.º 1
0
    protected void btnAssignandClose_Click(object sender, EventArgs e)
    {
        try
        {
            SaveItemsSelection();

            DataTable dtObs = (DataTable)ViewState["vsdtSelected_Items"];

            if (dtObs.Rows.Count > 0)
            {
                objBLLIndx.VET_INS_Obs_Assign_Jobs(dtObs, UDFLib.ConvertToInteger(ViewState["Observation_ID"].ToString()), Convert.ToInt32(Session["USERID"]));
                string js = "alert('Worklist Assigned Successfully!');";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alertjs", js, true);
            }
            else
            {
                string js1 = "alert('Please select job!');";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "alertjs1", js1, true);
            }

            string js12 = "parent.saveCloseChild();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "hideModalJS", js12, true);
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }