protected void ClearAll()
    {
        try
        {
            LblMsg.Text = "";

            HidFldId.Value = "";

            DDLClientName.Items.Clear();
            DDLClientName.DataSource     = BLayer.FillClient();
            DDLClientName.DataTextField  = "ClientName";
            DDLClientName.DataValueField = "ClientId";
            DDLClientName.DataBind();
            DDLClientName.Items.Insert(0, new ListItem("---Select Client---", "0"));

            TxtPrjName.Text   = "";
            TxtStartDate.Text = "";
            TxtEndDate.Text   = "";

            ddlPrjStatus.SelectedIndex = 0;
            TxtRemark.Text             = "";

            GridModule.DataSource = null;
            GridModule.DataBind();
        }
        catch (Exception ex)
        {
            Response.Write(ex.ToString());
        }
    }
    protected void FillModuleData()
    {
        try
        {
            if (int.Parse(HidFldId.Value) != 0)
            {
                StrSql        = new StringBuilder();
                StrSql.Length = 0;

                StrSql.AppendLine("Select Id,ProjectId,ModuleName");
                StrSql.AppendLine(",CONVERT(Varchar(10),StartDate,103) As StartDate ");
                StrSql.AppendLine(",CONVERT(Varchar(10),EndDate,103) As EndDate ");
                StrSql.AppendLine(",Case When IsNull(ModuleStatus,'')='D' Then 'Done'");
                StrSql.AppendLine("      When IsNull(ModuleStatus,'')='P' Then 'Pending'");
                StrSql.AppendLine("      When IsNull(ModuleStatus,'')='C' Then 'Cancle' Else '0' End As ModuleStatus");
                StrSql.AppendLine(",Remark  ");
                StrSql.AppendLine("From Project_Module ");
                StrSql.AppendLine("Where ProjectId=" + int.Parse(HidFldId.Value));
                StrSql.AppendLine("Order By StartDate");

                ds = new DataSet();
                ds = SqlFunc.ExecuteDataSet(StrSql.ToString());

                if (ds.Tables[0].Rows.Count != 0)
                {
                    GridModule.DataSource = ds;
                    GridModule.DataBind();
                    ModulePanel.Visible = true;
                }
                else
                {
                    ds.Tables[0].Rows.Add(ds.Tables[0].NewRow());
                    GridModule.DataSource = ds;
                    GridModule.DataBind();
                    int columncount = GridModule.Rows[0].Cells.Count;
                    GridModule.Rows[0].Cells.Clear();
                    GridModule.Rows[0].Cells.Add(new TableCell());
                    GridModule.Rows[0].Cells[0].ColumnSpan = columncount;
                    GridModule.Rows[0].Cells[0].Text       = "No Records Found";
                }
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.ToString());
        }
    }