Ejemplo n.º 1
0
 protected void btnClearFilter_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         DDLVessel.ClearSelection();
         DDLVetType.ClearSelection();
         DDLStatus.ClearSelection();
         DDLJobStatus.ClearSelection();
         txtDueDays.Text               = "";
         rbtnValid.Checked             = false;
         rbtnObservation.SelectedValue = "0";
         DDLOilMajor.ClearSelection();
         DDLInspector.ClearSelection();
         txtLVetFromDate.Text    = "";
         txtLVetToDate.Text      = "";
         txtVessel.Text          = "";
         chkVesselAssign.Checked = true;
         BindVesselDDL();
         UpdAdvFltr.Update();
         Bind_VettingIndex();
         if (hfAdv.Value == "o")
         {
             String tgladvsearchClr = String.Format("toggleOnSearchClearFilter(advText,'" + hfAdv.Value + "');");
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "tgladvsearchClr", tgladvsearchClr, true);
         }
         else
         {
             String tgladvsearchClr1 = String.Format("toggleOnSearchClearFilter(advText,'" + hfAdv.Value + "');");
             ScriptManager.RegisterStartupScript(Page, Page.GetType(), "tgladvsearchClr1", tgladvsearchClr1, true);
         }
     }
     catch (Exception ex)
     {
         UDFLib.WriteExceptionLog(ex);
         string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
     }
 }
Ejemplo n.º 2
0
    /// <summary>
    /// Bind Job status
    /// </summary>
    public void Add_JobStatus()
    {
        try
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Value");

            dt.Rows.Add("Pending");
            dt.Rows.Add("Completed");
            dt.Rows.Add("Verify");
            dt.Rows.Add("Deferred");

            DDLJobStatus.DataSource     = dt;
            DDLJobStatus.DataTextField  = "Value";
            DDLJobStatus.DataValueField = "Value";
            DDLJobStatus.DataBind();
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
            string js = "alert('" + UDFLib.GetException("SystemError/ GeneralMessage") + "');";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
        }
    }