protected void btnReset_Click(object sender, EventArgs e)
    {
        DefaultValues();
        DataSet ds = objCrewAdmin.Get_Crew_Matrix_Configuration();

        if (ds != null)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                for (int j = 0; j < chklstTankerCertification.Items.Count; j++)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        if (dt.Rows[i]["ID"].ToString() == Convert.ToString(chklstTankerCertification.Items[j].Value))
                        {
                            if (dt.Rows[i]["DefaultValue"].ToString() == "1")
                            {
                                chklstTankerCertification.Items[j].Selected = true;
                            }
                            else
                            {
                                chklstTankerCertification.Items[j].Selected = false;
                            }
                        }
                    }
                }
                DataTable dt1 = ds.Tables[1];
                dt1.DefaultView.RowFilter = "DefaultValue= 1";
                ddlSTCW.SelectedValue     = dt1.DefaultView[0]["Parameters"].ToString();
            }
        }
    }
    public void BindData()
    {
        try
        {
            DataSet ds = objCrewAdmin.Get_Crew_Matrix_Configuration();
            if (ds != null)
            {
                rptTanker.DataSource = ds.Tables[0];
                rptTanker.DataBind();

                rptSTCW.DataSource = ds.Tables[1];
                rptSTCW.DataBind();

                txtDate.Text = ds.Tables[2].Rows[0]["DefaultValue"].ToString() == "" ? "0" : ds.Tables[2].Rows[0]["DefaultValue"].ToString();
            }
        }
        catch (Exception ex)
        {
            UDFLib.WriteExceptionLog(ex);
        }
    }