<%@ page language="C#" autoeventwireup="true" inherits="html_ProjectPlanningM, App_Web_qsmgnciu" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="tm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

   
   
 
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link href="../CSS/bootstrap.css" rel="stylesheet" type="text/css" />
 
         <link href="../CSS/ForButton.css"type="text/css" rel="Stylesheet" />
             <link href="../CSS/Widthset.css" rel="stylesheet" type="text/css" />
      <script type="text/javascript" src="../js/JScript.js"></script>

    <script src="../js/JScript_showDiv_Hide.js" type="text/javascript"></script>
  
<script type = "text/javascript">
    function Confirm() {
        var confirm_value = document.createElement("INPUT");
        confirm_value.type = "hidden";
        confirm_value.name = "confirm_value";
        if (confirm("Do you want to  save Existing Project data?")) {
            confirm_value.value = "Yes";
        } else {
            confirm_value.value = "No";
        }
        document.forms[0].appendChild(confirm_value);
    }
    </script>
         
    <style type="text/css">
        
        
        
	.help_div
{
    box-shadow: 10px 10px 5px #888888;
   
      width:90px;
      display: block;
    height:auto;
       z-index: 2;
        opacity: 1;
         font-size: 12px;
         font-family:Verdana;
          border: 2px solid Blue; 
          padding: 5px;
           position: absolute;         
         line-height:20px;           
            float:right;       
          
     background-color:#ffffb3;
  
     text-align:center;
     margin-left:-100px;
    
}
   .help_div p
    {
    
      font-weight:bold;
      width:100px;
      margin-left:10px;
      
        }
        


     .shadow_five222 {
            background-color: #FFF0DB;      
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            -o-border-radius: 10px;
            -ms-border-radius: 10px;
            border-radius: 10px;
            -moz-box-shadow: 0px 0px 0px #B1A59A;
            -webkit-box-shadow: 0px 0px 0px #B1A59A;
            -o-box-shadow: 0px 0px 0px #B1A59A;
            -ms-box-shadow: 0px 0px 0px #B1A59A;
            box-shadow: 0px 0px 0px #B1A59A;
           width:65%;
        }
       .buttongreen
{
    color:green;  
    -moz-box-shadow:inset 0px 1px 0px 0px #54a3f7;
        -webkit-box-shadow:inset 0px 1px 0px 0px #54a3f7;
        box-shadow:inset 0px 1px 0px 0px #54a3f7; 
        
        
      
    background-color:#66adff;
        
        -moz-border-radius:3px;
        -webkit-border-radius:3px;
        border-radius:3px;
        
        border:1px solid #124d77;
        
        display:inline-block;
        color:#ffffff;
        font-family:arial;
        font-size:13px;
        font-weight:bold;
        padding:6px 10px;
        text-decoration:none;
        
        text-shadow:0px 1px 0px #154682;
}
        .modelbackground1
        {
        	background-color:Gray;
	        filter:alpha(opacity=70);
	        opacity:0.7;
        }
         .categorypanel1
        {
        	background-color:#FFF0DB;
        	border:2px solid black;
        	
        		}
         .shadow_five223 {
            background-color: #FFF0DB;      
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            -o-border-radius: 10px;
            -ms-border-radius: 10px;
            border-radius: 10px;
            -moz-box-shadow: 0px 0px 0px #B1A59A;
            -webkit-box-shadow: 0px 0px 0px #B1A59A;
            -o-box-shadow: 0px 0px 0px #B1A59A;
            -ms-box-shadow: 0px 0px 0px #B1A59A;
            box-shadow: 0px 0px 0px #B1A59A;
           width:100%;
        }
     .modelbackground
        {
        	background-color:Gray;
	        filter:alpha(opacity=70);
	        opacity:0.7;
        }
         .categorypanel
        {
        	background-color:White;
        	border:2px solid black;
        	
        		}  
     .Label
    {

       background-image: linear-gradient(to bottom, #fcfcfc, #f7f7f7 3%, #ff9966 12%,#55002b 90%, #55002b);
-webkit-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
-moz-box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white ;
box-shadow: 0 4px 25px rgba(0,0,0,0.32), inset 0 1px 0 white;
            height:25px;

}
     
            .shadow_five2 {
             background-color: #E1E1E1 ;
             -moz-border-radius: 10px;
             -webkit-border-radius: 10px;
             -o-border-radius: 10px;
             -ms-border-radius: 10px;
             border-radius: 10px;
             -moz-box-shadow: 3px 3px 5px #B1A59A;
             -webkit-box-shadow: 3px 3px 5px #B1A59A;
             -o-box-shadow: 3px 3px 5px #B1A59A;
             -ms-box-shadow: 3px 3px 5px #B1A59A;
             box-shadow: 3px 3px 5px #B1A59A;
             padding-top : auto;
             height:200px;
         }
              .cssPager table
        {
        	margin:7px 0px;
        	color:Blue;
        }   
        .cssPager span
        {        	
        	background-color:#F2F2F2;
        	border:1px solid #999999;
        	padding:1px 4px;
        	color:Blue;
        	font-weight:bold;
        }
        .cssPager td
        {
            
        	padding:0px 4px;           		
        }
         
        
        
        
                .cssLoadingTimer
        {        	
        	/* filter:alpha(opacity=90);       	
        	opacity:0.7; */        	
        	text-align:center; 
        	position:fixed; 
        	margin:5% 0% 0px 30%; 
        	   
        	width:300px;
        	height:20%;
        	background-color:#ffebcc;
        	display:inline;
            z-index:999;
            margin-top:200px;
            align:center;
        	
        
        }

     
        .style2
        {
            width: 200px;
        }

 .shadow_five_edit_list1 {
         
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            -o-border-radius: 10px;
            -ms-border-radius: 10px;
            border-radius: 10px;
            -moz-box-shadow: 3px 3px 5px #B1A59A;
            -webkit-box-shadow: 3px 3px 5px #B1A59A;
            -o-box-shadow: 3px 3px 5px #B1A59A;
            -ms-box-shadow: 3px 3px 5px #B1A59A;
            box-shadow: 3px 3px 5px #B1A59A;
            margin-bottom: 10px;
            width:100%;
        }
     
    </style>
    
    
   
    
    
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

 <script type="text/javascript">
     $().ready(function() {

         var hfYes = $('input[id$=hf_project_selected]').val();
         if (hfYes == "Yes") {
             //             bind_ActivityList();

             bind_all_activity_stage_task();
             BindEmployeeCheckBoxList();

             $("#btn_changes_project_end_date").show();

         }
         else {

             $("#btn_changes_project_end_date").hide();
         }

         $("#showdataList img").live('click', function(event) {

             var activityName = $(this).closest('tr').find("div").toggle();
         });

         $("#showdataList div").mouseout(function(event) {
             var activityName = $(this).closest('tr').find("div").hide();
         });

         $("#showdataList a").live('click', function(event) {
             // alert("Hi");
             var id = event.target.id;

             var Type = event.target.title;
             if (Type == "View Task") {

                 $("#plannningSheet tr").each(function() { //loop over each row

                     var valI = $(this).closest('tr').attr('id');
                     //  alert(valI);
                     var ppp = $(this).closest('tr').css('display');
                     //   alert(ppp);
                     if (valI == id) {
                         if (ppp == 'none') {
                             $(this).show(); //show the row
                         }
                         else {
                             $(this).hide();
                         }

                     }


                 });


             } else if (Type == "View Stage") {

                 //     alert("View Stage");

                 $("#plannningSheet tr").each(function() { //loop over each row

                     var valI = $(this).closest('tr').attr('id');

                     //   alert(valI);

                     var ppp = $(this).closest('tr').css('display');
                     //   alert(ppp);

                     if (valI == id) {
                         if (ppp == 'none') {
                             $(this).show(); //show the row
                         }
                         else {
                             $(this).hide();
                         }

                     }
                 });

             }

             else
                 if (Type == "Edit Activity") {
                 $("[id*=hf_ma_in_stage_id]").val(id);
                 $("#btn_Add_Activity").prop('value', 'Update');
                 $("#sub_stage_Popup").hide();
                 $("#div_show_main_stage_add_from").show();
                 $("#lbl_main_sub_stage_add_heading").html('Add Project Main Stage');

                 var activityName = $(this).closest('tr').children('td.two').text();
                 var Cost = $(this).closest('tr').children('td.three').text();
                 var Time = $(this).closest('tr').children('td.four').text();
                 var StartDate = $(this).closest('tr').children('td.five').text();
                 var EndDate = $(this).closest('tr').children('td.six').text();

                 $("#txt_main_stage_name").val(activityName);
                 $("#txt_Main_Stage_Cost").val(Cost);
                 $("#txt_main_stage_Start_Date").val(StartDate);
                 $("#txt_main_stage_Time_days").val(Time);
                 $("#txt_main_stage_End_Date").val(EndDate);


                 $.ajax({
                     type: "post",
                     url: "ProjectPlanningM.aspx/SelectedManagerID",
                     data: "{mainstage_id:'" + id + "'}",
                     contentType: "application/json; charset=utf-8",
                     dataType: "json",
                     success: function(response) {

                         var saa = response.d;

                         $("[id*=ddl_main_stage_manager]").val(saa);

                     },
                     failure: function(response) {
                         // alert("Test");
                     }
                 });



                 $find("show_activity_stage_popup").show();
             }
             else if (Type == "Edit Stage") {
                 $("#btn_submit_update_stage").prop('value', 'Update');
                 $("[id*=hf_sub_stage_id]").val(id)

                 $("#div_employee_checkbox_list").find('input[type=checkbox]').each(function() {
                     this.checked = false;
                 });

                 var activityName = $(this).closest('tr').children('td.two').text();
                 var StartDate = $(this).closest('tr').children('td.five').text();
                 var EndDate = $(this).closest('tr').children('td.six').text();
                 var Project_name = $("[id*=DropDownList2]").find("option:selected").text();
                 var StageName = $(this).closest('tr').children('td.two').text();
                 var stageCost = $(this).closest('tr').children('td.three').text();
                 var TimeVal = $(this).closest('tr').children('td.four').text();
                 var stageDate = $(this).closest('tr').children('td.five').text();
                 var stageendDate = $(this).closest('tr').children('td.six').text();
                 $("#txt_substage").val(StageName);
                 $("#txtstartdate11").val(stageDate);
                 $("#Dayscount").val(TimeVal);
                 $("#txtDate11").val(stageendDate);
                 $("#txtCost").val(stageCost);
                 $("#lbl_Project_name_val").html(Project_name);
                 $("#lbl_Mainstage_name_val").html(activityName);
                 $("#lbl_MAIN_stage_start_date").html(StartDate);
                 $("#lbl_main_stage_end_date").html(EndDate);
                 $("#sub_stage_Popup").show();
                 $("#div_show_main_stage_add_from").hide();

                 $.ajax({
                     type: "post",
                     url: "ProjectPlanningM.aspx/bind_selected_Employee_Name_list",
                     data: "{Sub_stage_id:'" + id + "'}",
                     contentType: "application/json; charset=utf-8",
                     dataType: "json",
                     success: function(response) {

                         var xmlDoc = $.parseXML(response.d);
                         var xml = $(xmlDoc);
                         var emps = xml.find("EmployeeIDS");
                         $.each(emps, function() {
                             var emp = $(this);
                             var s = $(this).find("emp_id").text();

                             $("#div_employee_checkbox_list").find('input[type=checkbox]').each(function() {

                                 var p = $(this).val();
                                 if (s == p) {
                                     this.checked = true;
                                 }
                                 else {
                                     //this.checked = false;
                                 }
                             });

                         });





                     },
                     failure: function(response) {

                     }
                 });

                 $find("show_activity_stage_popup").show();
             }
             else if (Type == "Delete Activity") {

                 $.ajax({
                     type: "post",
                     url: "ProjectPlanningM.aspx/deleteActivity",
                     data: "{Mainstage_ID:'" + id + "'}",
                     contentType: "application/json; charset=utf-8",
                     dataType: "json",
                     success: function(response) {

                         alert("Activity Deleted successfully.");

                         bind_all_activity_stage_task();

                     },
                     failure: function(response) {

                     }
                 });

             }
             else if (Type == "Delete Stage") {

                 $.ajax({
                     type: "post",
                     url: "ProjectPlanningM.aspx/delete_stage",
                     data: "{Stage_ID:'" + id + "'}",
                     contentType: "application/json; charset=utf-8",
                     dataType: "json",
                     success: function(response) {

                         alert("Stage Deleted successfully.");
                         bind_all_activity_stage_task();
                     },
                     failure: function(response) {
                         // alert("Test");
                     }
                 });

             }
             else if (Type == "Add Stage") {

                 $("#chk_allow_sub_sub_stage").prop("checked", true);

                 $('#txtstartdate11').val('');
                 $('#Dayscount').val('');
                 $('#txtDate11').val('');
                 $('#txtCost').val('');
                 $('#txt_substage').val('');
                 $("#div_employee_checkbox_list").find('input[type=checkbox]').each(function() {
                     this.checked = false;
                 });
                 $("#btn_submit_update_stage").prop('value', 'Submit');
                 $("[id*=hf_ma_in_stage_id]").val(id);
                 var activityName = $(this).closest('tr').children('td.two').text();
                 var StartDate = $(this).closest('tr').children('td.five').text();
                 var EndDate = $(this).closest('tr').children('td.six').text();
                 var Project_name = $("[id*=DropDownList2]").find("option:selected").text();
                 $("#lbl_Project_name_val").html(Project_name);
                 $("#lbl_Mainstage_name_val").html(activityName);
                 $("#lbl_MAIN_stage_start_date").html(StartDate);
                 $("#lbl_main_stage_end_date").html(EndDate);
                 $("#lbl_main_sub_stage_add_heading").html('Add Stages');
                 $("#sub_stage_Popup").show();
                 $("#div_show_main_stage_add_from").hide();
                 $find("show_activity_stage_popup").show();

             }


         });

         $("#btn_Add_new_activity").click(function() {

             $('#txt_main_stage_Start_Date').val('');
             $('#txt_main_stage_name').val('');
             $('#txt_main_stage_Time_days').val('');
             $('#txt_main_stage_End_Date').val('');
             $('#txt_Main_Stage_Cost').val('');
             $("#ddl_main_stage_manager option:first").attr("selected", true);

             $("#btn_Add_Activity").prop('value', 'Submit');
             $("#sub_stage_Popup").hide();
             $("#div_show_main_stage_add_from").show();
             $("#lbl_main_sub_stage_add_heading").html('Add Project Main Stage');
             $find("show_activity_stage_popup").show();

         });



         $("#btn_Add_Activity").click(function() {

             if (Page_ClientValidate(12)) {
                 if ($(this).val() == "Submit") {
                     Add_update_activity("Submit");
                     bind_all_activity_stage_task();

                     $find("show_activity_stage_popup").hide();
                 }
                 else {
                     Add_update_activity("Update");
                     bind_all_activity_stage_task();
                     $find("show_activity_stage_popup").hide();
                 }
             }
             else {

             }

         });

         $("#btn_submit_update_stage").click(function() {
             var m_id = $('input[id$=hf_ma_in_stage_id]').val();
             if (Page_ClientValidate(15)) {
                 if ($(this).val() == "Submit") {

                     AddUpdate_stage_Details("Submit", m_id, "0");
                     bind_all_activity_stage_task();
                     $find("show_activity_stage_popup").hide();

                 }
                 else {
                     var stageID = $('input[id$=hf_sub_stage_id]').val();
                     AddUpdate_stage_Details("Update", m_id, stageID);
                     bind_all_activity_stage_task();
                     $find("show_activity_stage_popup").hide();
                 }
             }
             else {

             }
         });

         $("#btn_changes_project_end_date").click(function() {


             if ($(this).val() == "Changes end date") {
                 $("#txtend").removeAttr("disabled");
                 $("#btn_changes_project_end_date").prop('value', 'Update');

             }
             else {


                 var PRID = $("[id*=DropDownList2]").val();
                 var startDate = $('#txtstart').val();
                 var end_date = $('#txtend').val();

                 $.ajax({
                     type: "POST",
                     url: "ProjectPlanningM.aspx/update_project_end_date",
                     data: "{PRID:'" + PRID + "',end_date:'" + end_date + "',start_date:'" + startDate + "'}",
                     contentType: "application/json; charset=utf-8",
                     dataType: "json",
                     success: function(r) {

                         alert(r.d);
                         if (r.d == "Project end date extended successfully.") {


                             $("#btn_changes_project_end_date").prop('value', 'Changes end date');
                             $('#txtend').attr("disabled", "disabled");
                         }


                     },
                     error: function(r) {
                         alert(r);
                     }
                 });

             }





         });




         function Add_update_activity(Type_update_submit) {

             var m_id = $('input[id$=hf_ma_in_stage_id]').val();
             //  alert(m_id);
             var PRID = $("[id*=DropDownList2]").val();
             //alert(PRID);
             var startDate = $('#txt_main_stage_Start_Date').val();
             // alert(startDate);
             var activity = $('#txt_main_stage_name').val();
             activity = activity.replace(/'/g, "");
             $("#txt_substage").val(activity);

             // alert(activity);
             var Timedays = $('#txt_main_stage_Time_days').val();
             var Activity_end_date = $('#txt_main_stage_End_Date').val();
             // alert(Activity_end_date);
             var main_stageCost = $('#txt_Main_Stage_Cost').val();
             // alert(main_stageCost);
             var managerID = $("[id*=ddl_main_stage_manager]").val();
             // alert(managerID);
             var Project_end_date = $('#txtend').val();
             // alert(Project_end_date);

             $.ajax({
                 type: "POST",
                 url: "ProjectPlanningM.aspx/AddNewActivity",
                 data: "{add_update:'" + Type_update_submit + "',prid:'" + PRID + "',stage_Start_Date:'" + startDate + "',Activity_name:'" + activity + "',User_id:'" + hf_user_id.value + "',main_stage_Time_days:'" + Timedays + "',_Main_Stage_Cost:'" + main_stageCost + "',main_stage_manager:'" + managerID + "',_main_stage_End_Date:'" + Activity_end_date + "',_project_end_date:'" + hf_project_end_date.value + "',_mainstage_id:'" + m_id + "'}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 success: function(r) {

                     alert(r.d);
                     // alert("Record inserted successfully");
                     $('#txt_main_stage_Start_Date').val('');
                     $('#txt_main_stage_name').val('');
                     $('#txt_main_stage_Time_days').val('');
                     $('#txt_main_stage_End_Date').val('');
                     $('#txt_Main_Stage_Cost').val('');
                     $("#ddl_main_stage_manager option:first").attr("selected", true);

                 },
                 error: function(r) {
                     alert(r);
                 }
             });
         }



         $("#Dayscount").change(function(event) {

             var startDate = $('#txtstartdate11').val();
             var totaldays = $('#Dayscount').val();

             $.ajax({
                 type: "POST",
                 url: "ProjectPlanningM.aspx/StageEnd_Date",
                 data: "{start_date:'" + startDate + "',days:'" + totaldays + "',user_id:'" + hf_user_id.value + "'}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 success: function(r) {
                     $('#txtDate11').val(r.d);

                 },
                 error: function(r) {
                     alert(r);
                 }
             });



         });

         $("#txt_main_stage_Time_days").change(function(event) {

             var startDate = $('#txt_main_stage_Start_Date').val();
             var totaldays = $('#txt_main_stage_Time_days').val();

             $.ajax({
                 type: "POST",
                 url: "ProjectPlanningM.aspx/ActivityEnd_date",
                 data: "{start_date:'" + startDate + "',days:'" + totaldays + "',User_id:'" + hf_user_id.value + "'}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 success: function(r) {
                     $('#txt_main_stage_End_Date').val(r.d);


                 },
                 error: function(r) {
                     alert(r);
                 }
             });



         });

         $("[id*=lnk_close_pop]").click(function() {
             $find("show_activity_stage_popup").hide();
         });


         function BindEmployeeCheckBoxList() {
             var PRID = $("[id*=DropDownList2]").val();
             $.ajax({

                 type: "POST",
                 url: "ProjectPlanningM.aspx/bind_Employee_Name_checkbox_list",

                 data: "{User_id:'" + hf_user_id.value + "',prid:'" + PRID + "'}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 success: function(response) {

                     $("#div_employee_checkbox_list").empty();

                     var xmlDoc = $.parseXML(response.d);
                     var xml = $(xmlDoc);
                     var employees = xml.find("EmployeeList");
                     $.each(employees, function() {
                         var employee = $(this);
                         var checkBox = "<input type='checkbox' name='chkEmployeeNameList' value='" + $(this).find("EID").text() + "'/>" + $(this).find("EName").text() + "<br/>";
                         $(checkBox).appendTo('#div_employee_checkbox_list');

                     });

                 },
                 error: function(response) {
                     //alert(response.d);
                 }
             });
         }

         function AddUpdate_stage_Details(But_tonType, main_stage_id, substage_id) {



             var selected_item = "";
             var selected_empid = "";
             var empIDs_with_comma = "";
             $('#div_employee_checkbox_list input:checked').each(function() {
                 //             $("#div_employee_checkbox_list").find('input[type=checkbox]').each(function() {
                 selected_empid = $(this).attr('value');
                 selected_item += $(this).attr('value') + ",";
             });
             empIDs_with_comma = selected_item;

             //  alert(selected_item);
             if (selected_empid == "") {

                 alert("Select Employee for stage");
             }
             else {
                 var PRID = $("[id*=DropDownList2]").val();
                 var client_id = $("[id*=DropDownList1]").val();
                 var sub_stage = $("#txt_substage").val();
                 sub_stage = sub_stage.replace(/'/g, "");
                 $("#txt_substage").val(sub_stage);
                 var s_start_date = $("#txtstartdate11").val();
                 var days = $("#Dayscount").val();
                 var enddateval = $("#txtDate11").val();
                 var cost = $("#txtCost").val();
                 var _allow_sub_stage = "";

                 if ($("#chk_allow_sub_sub_stage").is(':checked')) {

                     _allow_sub_stage = "true";

                 } else {
                     _allow_sub_stage = "false";
                 }



                 $.ajax({
                     type: "POST",
                     url: "ProjectPlanningM.aspx/Add_Update_stage_Deta_ils",
                     data: "{TypeButton:'" + But_tonType + "',User_id:'" + hf_user_id.value + "',client_id:" + client_id + ",project_id:'" + PRID + "',mainstage_id:'" + main_stage_id + "',sub_stage:'" + sub_stage + "',start_date:'" + s_start_date + "',pdc_date:'" + enddateval + "',total_days:'" + days + "',Totalcost:'" + cost + "',selected_empid:'" + selected_empid + "',_allow_sub_stage:'" + _allow_sub_stage + "',substage_id:'" + substage_id + "',empIDs_with_comma:'" + empIDs_with_comma + "'}",
                     contentType: "application/json; charset=utf-8",
                     dataType: "json",
                     success: function(response) {

                         alert("Record inserted successfully");
                         $('#txtstartdate11').val('');
                         $('#Dayscount').val('');
                         $('#txtDate11').val('');
                         $('#txtCost').val('');
                         $('#txt_substage').val('');


                         $("#div_employee_checkbox_list").find('input[type=checkbox]').each(function() {
                             this.checked = false;
                         });
                         bind_all_activity_stage_task();


                     },
                     failure: function(response) {
                         alert(response.d);
                     }

                 });
             }
         }


         function bind_all_activity_stage_task() {


             var PRID = $("[id*=DropDownList2]").val();

             $.ajax({
                 type: "post",
                 url: "ProjectPlanningM.aspx/bindallactivity_stage_task",

                 data: "{User_id:'" + hf_user_id.value + "',prid:'" + PRID + "'}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 success: function(response) {
                     $("#showdataList").empty();
                     var data_val = response.d;
                     $("#showdataList").append(data_val);


                     $("#plannningSheet tbody tr.Class_stages").hide();
                     $("#plannningSheet tbody tr.aaaabb").hide();


                 },
                 failure: function(response) {
                     alert(response.d);
                 }

             });
         }






     });

 </script>
 
    <title></title>
</head>
<body style="background-color: #C1C1C1;">
    
   
    
    <form id="form2" runat="server"  class="bs-example form-horizontal">    
   
  <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    <Scripts>
    <asp:ScriptReference Path="~/js/webkit.js" />
    <asp:ScriptReference Path="~/js/JScript.js" />
    </Scripts>
    </cc1:ToolkitScriptManager>
    <asp:UpdateProgress ID="UpdateProgress2" runat="server"  
                           DynamicLayout="true"  >
                          <ProgressTemplate>
                          <div style="width:100%;">
                              <div class="cssLoadingTimer"  >
                              <p> Please wait...</p>
                                  <img id="Img1111" alt="Loading..." src="../images/Regloader.gif" runat="server" style="margin-top:15px;" align="middle"  />
                                  </div>
                                  
                                  </div>
                          </ProgressTemplate>
                      </asp:UpdateProgress>
    

  
     <%--   <asp:UpdatePanel ID="update_fillreoprt" runat="server">
       <ContentTemplate>--%>
       
          <asp:HiddenField ID="hf_project_selected" runat="server" />
          
          <asp:HiddenField ID="hf_user_id" runat="server" />
           <asp:HiddenField ID="hf_prid" runat="server" />
           <asp:HiddenField ID="hf_mainstage_id" runat="server" />
           <asp:HiddenField ID="hf_ma_in_stage_id" runat="server" />
           
             <asp:HiddenField ID="hf_sub_stage_id" runat="server" />
        
  
        <div class="bs-docs-section">
        <div class="row">       
          <div class="col-sm-6">
                
                
                
                    <div class="well">
             
                  <legend>
                
                   <asp:Label ID="Label5" runat="server" Text="&nbsp;&nbsp;Project Planning" CssClass="Label" 
                    Height="25px" ForeColor="White" Font-Bold="True" 
                    Font-Size="Medium"></asp:Label>
                  </legend>
                
        
            <span class="help-block">
                    <%--&nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;--%>
              <asp:Button runat="server" ID="btn_addmainstages" Text="Add Activity / Stages" 
             onclick="btn_addmainstages_Click" class="btn btn-primary" Width="175px" />
              &nbsp;&nbsp; &nbsp;&nbsp;
             
             <asp:Button runat="server" ID="btn_projectPlan" Text="Show Planning" 
             class="btn btn-primary" Width="150px" onclick="btn_projectPlan_Click" />
             
            &nbsp;&nbsp; &nbsp;&nbsp;
                    
                    
                       <asp:Button runat="server" ID="Button3" Text="Add Tasks" 
            class="btn btn-primary" onclick="Button2_Click"  />
              
                    &nbsp;&nbsp; &nbsp;&nbsp; <asp:Button ID="Button4" runat="server" class="btn btn-primary"
                     Text="Close" PostBackUrl="~/html/mainpage.aspx" 
                    Width="100px"  /> 
                     <asp:Button ID="btn_home_admin" runat="server" class="btn btn-primary"
                     Text="Close" PostBackUrl="~/html/Home.aspx" 
                    Width="100px"  /> 
                                  </span>
           
            
              <div ID="pnl_show_main_stage" runat="server"  class="shadow_five223" Visible="false">
              
              
              <%--
               <legend>
                  &nbsp; &nbsp;
                   <asp:Label ID="Label2" runat="server" Text="&nbsp;&nbsp;Add project wise Main stages" CssClass="Label" 
                    Height="25px" Width="30%" ForeColor="White" Font-Bold="True" 
                    Font-Size="Medium"></asp:Label>
                  </legend>--%>
                     <div class="form-group">
               
                    <label for="inputEmail" class="col-lg-2 control-label">Select Client Name</label>
                    
                    
                    <div class="col-lg-10">
                           <asp:DropDownList ID="DropDownList1" runat="server" 
                     DataTextField="CName" DataValueField="CID"                     
                    AutoPostBack="True" AppendDataBoundItems="True" 
                    onselectedindexchanged="DropDownList1_SelectedIndexChanged"  CssClass="form-control1" >
                </asp:DropDownList>
                
                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator14" InitialValue="-Select-" ControlToValidate="DropDownList1" 
  ErrorMessage="Select Client Name" ValidationGroup="ABC" ForeColor="Red"></asp:RequiredFieldValidator>
                
  <%-- 
   <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" InitialValue="-Select-" ControlToValidate="ddl_client" ErrorMessage="Select Client Name" ValidationGroup="all"></asp:RequiredFieldValidator>
--%>
                     </div>
                      <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Select Project Name</label>
                    
                    
                    <div class="col-lg-10">
                                <asp:DropDownList ID="DropDownList2" runat="server" 
                    DataTextField="PName" DataValueField="PrID"                    
                    AutoPostBack="True" AppendDataBoundItems="True" 
             onselectedindexchanged="DropDownList2_SelectedIndexChanged"  CssClass="form-control1">
                </asp:DropDownList>
 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidatorsaa13" InitialValue="-Select-" ControlToValidate="DropDownList2" 
 ErrorMessage="Select Client Name" ValidationGroup="ABC" ForeColor="Red"></asp:RequiredFieldValidator>
    <%-- <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator14" InitialValue="-Select-" ControlToValidate="ddl_client" ErrorMessage="Select Client Name" ValidationGroup="all"></asp:RequiredFieldValidator>
--%>
                     </div>
                     </div>
                      <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Project Head</label>
                    
                    
                    <div class="col-lg-10">
                                <asp:TextBox runat="server" ID="lbl_project_head" Text='<% # Eval("EName") %>'  Enabled="false"  CssClass="form-control1"></asp:TextBox>
     <asp:Label runat="server" ID="lbl_project_head_id" Text='<% # Eval("EID") %>' Visible="false"></asp:Label>
     
                     </div>
              </div>
                 <div class="form-group">
               <label for="inputEmail"   class="col-lg-2 control-label">Project No</label>
                <div class="col-lg-10">
                                <asp:TextBox runat="server" ID="txt_projno" Text='<% # Eval("PCode") %>'  Enabled="false"  CssClass="form-control1"></asp:TextBox>
    
     
                     </div>
                &nbsp;
                
                 <label  for="inputEmail" class="col-lg-2 control-label">Project Team</label>
                 <div class="col-lg-10">
                                <asp:TextBox runat="server" ID="txt_projteam" Text='<% # Eval("project_team") %>' Enabled="false"  CssClass="form-control1"></asp:TextBox>
    
     
                     </div>
                &nbsp;
                 <label for="inputEmail"  class="col-lg-2 control-label">End User</label>
                  <div class="col-lg-10">
                                <asp:TextBox runat="server" ID="txtEndUser" Text='<% # Eval("End_user") %>' Enabled="false"  CssClass="form-control1"></asp:TextBox>
                              
                                                                 
                                
    
     
                     </div>
                 <br /><br />
                  <label  class="col-lg-2 control-label">Start Date</label>
                  <div class="col-lg-10">
                                <asp:TextBox runat="server" ID="txtstart" Text='<% # Eval("pro_startdatenew") %>'  Enabled="false" Width="120px"  CssClass="form-control1"></asp:TextBox>
    
     
                     </div>
                  &nbsp;
                   <label  for="inputEmail" class="col-lg-2 control-label">End Date</label>
                   <div class="col-lg-10">
                   <div style="width:100%;">
                   <div style="width:30%;float:left;">
                                <asp:TextBox runat="server" ID="txtend" Text='<% # Eval("End_Datenew") %>'  Enabled="false"  Width="120px" CssClass="form-control1"></asp:TextBox>
                             
                                  <cc1:CalendarExtender ID="Calenda_rExt_ender5" runat="server" 
                          Enabled="True" TargetControlID="txtend" Format="dd-MM-yyyy">
                         </cc1:CalendarExtender>
                         
                       <asp:HiddenField ID="hf_project_end_date" runat="server" />
                       </div>
                       <div style="float:right;width:65%;">
            
                          <input id="btn_changes_project_end_date" type="button" value="Changes end date" class="btn btn-primary" validationgroup="15"  width="100px"  />
                       </div>    
     </div>
                     </div>
            
              </div>
              <br /><br />
            
              <div align="center" id=showlink runat="server"  style="margin-left:5px;">            
             <input id="btn_Add_new_activity" type="button" value="Add Activity" title="Add Activity"  class="btn btn-primary" />
                                
                         
             &nbsp;&nbsp;&nbsp;     &nbsp;&nbsp;&nbsp; 
              <asp:Button runat="server" ID="Existingpro" Text=" Import Stages From Existing Project List" 
             class="btn btn-primary" Width="275px" onclick="Existingpro_Click" ValidationGroup="ABC" />
             
           
              
              
                                        
        &nbsp;
                     <asp:Label ID="lbl_total_days_msgnew11" runat="server" Text="" Font-Names="Verdana" Font-Size="12px" ForeColor="Red"  ></asp:Label>
                    
                                       
              </div>
              &nbsp;
               <div class="form-group" visible="false" id="existdrop" runat="server">
                    <label for="inputEmail" class="col-lg-2 control-label">Select Existing Project&nbsp;<a style="color:Red;">*</a></label> 
                  <div  class="col-lg-10" >
                  <asp:DropDownList ID="DropDownList3" runat="server" AppendDataBoundItems="true"                        
                    AutoPostBack="True" 
                      CssClass="form-control1" 
                          onselectedindexchanged="DropDownList3_SelectedIndexChanged"  >
                </asp:DropDownList>
                  </div>
                  <br /><br /><br /><br />
                  </div>
                <div class="form-group" visible="false" id="sublist" runat="server">  
                
                    <table style="margin-left:30px;">
               <tr>
               <td></td><td></td><td></td>
               <td >
               <div style="background-color:#ffc9bb;width:20px;">&nbsp;</div>
               </td>
               <td><b>Activity</b></td><td></td><td></td>
               <td >
               <div style="background-color:#E6FFFF;width:20px;">&nbsp;</div><td></td>
               </td>
               <td><b>Stages</b></td><td></td><td></td>
               <td></td>
               <td>
               <div  style="background-color:#ffffff;width:20px;">
               &nbsp;
               </div>
               </td><td></td>
               <td><b>Task</b></td>
               <td></td><td></td><td></td><td></td><td></td><td></td><td></td>
               </tr>
               </table>                      
                                 <div style="width:98%;margin-left:10px">
                
                
                                     <asp:HiddenField ID="hf_mainstage_id_val" runat="server" />
                                  
                                     <%= show_plan %>
                                     

<div id="showdataList">

</div>
                                     
                       
            
            <asp:Label runat="server"  ID="lbyes" Visible="false" ForeColor="Green"><b>  Do you want to add above into New Project Planning? </b></asp:Label> 
            <asp:Button runat="server" ID="Addprojplan" Text="yes" 
             class="btn btn-primary" Width="50px" Visible="false" OnClick="Addprojplan_Click" OnClientClick="return confirm('Are you sure?');" /> 
             &nbsp;
             <asp:Button runat="server" ID="noadd" Text="NO" 
             class="btn btn-primary" Width="50px" Visible="false" OnClick="NoAddplan_Click" /> 
                 
                  </div>
                 
                 
                      
                   
                        </div> 
                  
       </div>
           
            
            </div>
            
            <div  ID="pnl_show_Project_ddl" runat="server" class="shadow_five223" Visible="false">
             <div class="form-group" id="Div1" runat="server">
                    <label for="inputEmail" class="col-lg-2 control-label">Select Project Name&nbsp;<a style="color:Red;">*</a></label> 
                  <div  class="col-lg-10" >
                  <asp:DropDownList ID="ddl_projectName" runat="server"                                       
                    AutoPostBack="True"  
                      CssClass="form-control1"                  
                   AppendDataBoundItems="True" 
                          onselectedindexchanged="ddl_projectName_SelectedIndexChanged" >
                </asp:DropDownList>
                  </div>
                  </div>
            </div>
                     
                    
          <div ID="pnl_substage" runat="server" class="shadow_five226">
                 
                
                <legend>
                  &nbsp; &nbsp;
                   <asp:Label ID="Label3" runat="server" Text="&nbsp;&nbsp; Add project wise sub stages" CssClass="Label" 
                    Height="25px"  ForeColor="White" Font-Bold="True" 
                    Font-Size="Medium"></asp:Label>
                  </legend>
                   <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Select Client Name&nbsp;<a style="color:Red;">*</a></label> 
                     <%--<b style="color:Red;">*</b>  --%>                 
                    <div class="col-lg-10">
                               <asp:DropDownList ID="ddl_client" runat="server" 
                    DataTextField="CName" DataValueField="CID"                  
                    AutoPostBack="True" AppendDataBoundItems="True" 
                    onselectedindexchanged="ddl_client_SelectedIndexChanged" CssClass="form-control1">
                </asp:DropDownList>
    <asp:RequiredFieldValidator runat="server" ID="rfv_ddl_client" InitialValue="-Select-" ControlToValidate="ddl_client" ErrorMessage="Select Client" ValidationGroup="1"
     ForeColor="Red"></asp:RequiredFieldValidator>
    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" InitialValue="-Select-" ControlToValidate="ddl_client" 
    ErrorMessage="Select Client name for view all records." ValidationGroup="all" ForeColor="Red"></asp:RequiredFieldValidator>
  <asp:Label ID="lblInsert" runat="server" Font-Names="Verdana" Font-Size="12px" 
                    ForeColor="Red"></asp:Label>
                     </div>
                   </div>
                   <div class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label">Select Project Name&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                     <asp:DropDownList ID="ddl_projectclientwise" runat="server" 
                    DataTextField="PName" DataValueField="PrID"                    
                    AutoPostBack="True" AppendDataBoundItems="True" 
                    onselectedindexchanged="ddl_projectclientwise_SelectedIndexChanged" CssClass="form-control1">
                </asp:DropDownList>
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" InitialValue="-Select-" ControlToValidate="ddl_projectclientwise"
                     ErrorMessage="Select Project Name" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator12" InitialValue="-Select-" ControlToValidate="ddl_projectclientwise" 
                    ErrorMessage="Select Project Name for view records" ValidationGroup="all" ForeColor="Red"></asp:RequiredFieldValidator>

                     </div>
                     
                   </div>
                    <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Select Activity&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                           <asp:DropDownList ID="ddl_projectmain_stage" runat="server" 
                    DataTextField="Mainstage_name" DataValueField="Mainstage_ID" CssClass="form-control1"                    
                    AutoPostBack="True" AppendDataBoundItems="True" onselectedindexchanged="ddl_projectmain_stage_SelectedIndexChanged" >
                </asp:DropDownList>
                                 <asp:RequiredFieldValidator runat="server" ID="Re_ddl_projectmain_stage" InitialValue="-Select-" ControlToValidate="ddl_projectmain_stage"
                                  ErrorMessage="Select Activity" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>

                     </div>
                     <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Select Stage&nbsp;<a style="color:Red;">*</a></label>
                     <div class="col-lg-10">
                           <asp:DropDownList ID="ddlsubstage" runat="server" 
                    DataTextField="sub_stage_desc" DataValueField="substage_id" CssClass="form-control1"                    
                    AutoPostBack="True" AppendDataBoundItems="True" onselectedindexchanged="ddlsubstage_SelectedIndexChanged" Width="300px">
                </asp:DropDownList>  
                        
                         
                  <asp:Label runat="server" ID="lbl_sub_sub_stage_not_allow_msg" Text="Tasks not allowed to selected stage."
                   Visible="false" ForeColor="Red" Font-Names="Verdana" Font-Size="12px" ></asp:Label>               
                 <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" InitialValue="-Select-" ControlToValidate="ddlsubstage"
                                  ErrorMessage="Select Stage" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>

                     </div>
                     </div>
                    
                   </div>
                   
                    <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Tasks details&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                        <asp:RadioButton ID="rb_upload_Manually" runat="server" Text="Manually" 
                            Checked="true" GroupName="AS" 
                            oncheckedchanged="rb_upload_Manually_CheckedChanged" AutoPostBack="true" />
                              &nbsp;&nbsp;&nbsp;      
                        <asp:RadioButton ID="rb_upload_ExcelSheet" runat="server" 
                            Text="Upload Excel Sheet" GroupName="AS"  AutoPostBack="true"
                            oncheckedchanged="rb_upload_ExcelSheet_CheckedChanged" />  
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                              <asp:HyperLink ID="Hexcel" runat="server" BorderStyle="None" 
                                   NavigateUrl="~/Reports/TaskUpload.xlsx" 
                                    Target="_blank" Text="DownLoad File" Width="100px"></asp:HyperLink>    


                     </div>
                   </div>
                   
                    
                         
                          <div id="div_other_stage_option" runat="server" visible="false" class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">&nbsp;<a style="color:Red;"></a></label>
                    <div class="col-lg-10">
                   
                          <asp:CheckBox ID="chk_no_stage" Text="Other Stage" runat="server" Visible="false"  AutoPostBack="true"
                               oncheckedchanged="chk_no_stage_CheckedChanged" />      
                    

                     </div>
                   </div>
                         
                   
                     <div id="div_upload_excelFile_control" runat="server" visible="false" class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Select file&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                   
                               
                        <asp:FileUpload ID="FileUpload1" runat="server" />  


                     </div>
                   </div>
                   
                   
                   <div id="div_task_textbox" runat="server" class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Tasks details&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                             <asp:TextBox ID="txt_substagedetails" runat="server" Height="42px" CssClass="form-control1" 
                   TextMode="MultiLine"></asp:TextBox>
             <asp:RequiredFieldValidator runat="server" ID="RequiredFieldtxt_substagedetails" ControlToValidate="txt_substagedetails"
              ErrorMessage="Enter Tasks details" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>

                     </div>
                   </div>
                  
                     <div id="div_start_date" runat="server" class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1"> Start Date&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                            <asp:TextBox ID="txtstartDate" runat="server" CssClass="form-control1"></asp:TextBox>
            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" 
                          Enabled="True" TargetControlID="txtstartDate" Format="dd/MM/yyyy">
                         </cc1:CalendarExtender>
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtstartDate" ErrorMessage="Enter starting date" 
                                ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>                      
                     </div>
                   </div>
                   
                   
                     <div id="div_days" runat="server"  class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Days&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10" >
                                             
                        <asp:TextBox ID="txt_total_days" runat="server" AutoPostBack="true"  
                    Height="22px" CssClass="form-control1" ontextchanged="txt_total_days_TextChanged"></asp:TextBox>
                    
                    
                       <asp:Label ID="lbl_total_days_msg" runat="server" Text="" Font-Names="Verdana" Font-Size="12px" ForeColor="Red" ></asp:Label>
                      <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                ControlToValidate="txt_total_days" ErrorMessage="Enter days" 
                                ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                 
                    
                     </div>
                   </div>
                   
                   
                   
                   <div id="div_completion_date" runat="server" class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">completion date</label>
                      <div class="col-lg-10">
                        <asp:TextBox ID="txt_pdcdate" runat="server" Enabled="false" CssClass="form-control1"></asp:TextBox>
                     </div>
                   </div>
                 
                   
                   <div id="div_time_Minutes" runat="server" class="form-group"  >
                    <label for="input_enquiry" class="col-lg-2 control-label" CssClass="form-control1">Estimated time</label>
                    <div class="col-lg-10">
                    <div style="100%;">
                    <div style="float:left;">
                        <asp:TextBox ID="txt__time_Minutes" runat="server" CssClass="form-control1" Width="100px"></asp:TextBox>
                        </div>
                     <div style="float:left;">
                        <asp:DropDownList ID="ddl_type_day_hrs" runat="server">
                        <asp:ListItem Value="-Select-" Text="-Select-"></asp:ListItem>
                        <asp:ListItem Text="Days" Value="Days"></asp:ListItem>
                        <asp:ListItem Text="Hrs" Value="Hrs"></asp:ListItem>
                         <asp:ListItem Text="Minutes" Value="Minutes"></asp:ListItem>
                       
                        </asp:DropDownList>
                        
                       
                     </div>
                        </div>
                   <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Numbers" TargetControlID="txt__time_Minutes">
                </cc1:FilteredTextBoxExtender>
                   <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                                ControlToValidate="txt__time_Minutes" ErrorMessage="Enter Time." 
                                ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                                   <asp:RequiredFieldValidator ID="Req_uiredFi_eldValidato_r1_3" runat="server" 
                                ControlToValidate="ddl_type_day_hrs" InitialValue="-Select-" ErrorMessage="Select Days / Hrs." 
                                ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                                
                     </div>
                   </div>


               
                   <div id="div_cost" runat="server" class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Cost</label>
                    <asp:Label runat="server" ID="lbl_currency_display" Text="" ForeColor="Red"></asp:Label>
                    <div class="col-lg-10">
                       <asp:TextBox ID="txt_per_stageCost" runat="server"  
                    Height="22px" CssClass="form-control1" AutoPostBack="True" 
                    ontextchanged="txt_per_stageCost_TextChanged"></asp:TextBox>
                      <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Numbers" TargetControlID="txt_per_stageCost">
                </cc1:FilteredTextBoxExtender>
                
                   <asp:Label runat="server" ID="lbl_per_stagecost_msg" Text="" ForeColor="Red" Font-Names="Verdana" Font-Size="12px" ></asp:Label>
                  
                     </div>
                   </div>
               
                  
                   <div id="div_select_Emp" runat="server" class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Select Employee Name</label>
                    <div class="col-lg-10">
                           <div style="height:150px;overflow:auto;width:250px;line-height:20px;" class="shadow_five1">
            <asp:CheckBoxList ID="ddl_employee" runat="server"  DataTextField="EName" DataValueField="EID" 
                        Font-Names="Verdana" Font-Size="12px" ></asp:CheckBoxList>
            
       
            </div>
                     </div>
                   </div>              
                
            
            
                     
                   
                  <span class="help-block">
                  <asp:Label ID="lblComplete" runat="server" Font-Names="Verdana" Font-Size="12px" 
                     ForeColor="#007500" Text=""></asp:Label>
                  </span>
               
                  <span class="help-block">
                    &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;
                    <br />
              <asp:Button ID="btninsert_stages" runat="server" class="btn btn-primary"
                onclick="btninsert_stages_Click" Text="Submit" ValidationGroup="1" />
              
                 <%-- <asp:Button ID="Button1" runat="server" class="btn btn-primary"
                     Text="Close" PostBackUrl="~/html/mainpage.aspx" 
                    Width="100px"  />--%>
                     <asp:Label ID="lbl_message" runat="server" Text="" ForeColor="Red"></asp:Label>
                     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                     
                     <br />
                     
                     <asp:Label ID="lbl_delete_records_msg" runat="server" Text="" ForeColor="Red"></asp:Label> <br />
                         <asp:Label ID="lblCustDeleted" runat="server" Text="" ForeColor="Red"></asp:Label>   <br />
                         <asp:Label ID="lbl_taskName" runat="server" Text="" ForeColor="Red"></asp:Label>     
                        
                        
                                     
               &nbsp;&nbsp; 
                    
                      <asp:Label ID="Label1" runat="server" Text="" ForeColor="Red"></asp:Label>
                     <b> <a style="color:Red;  padding-right:20px; float:right; ">* Indicates Compulsory Fields</a></b>
              
                   <%--  <asp:UpdateProgress ID="UpdateProgress1" runat="server" 
                           DynamicLayout="true">
                          <ProgressTemplate>
                              <div>
                                  <img id="Img1" alt="Loading..." src="../images/Regloader.gif" runat="server" />
                                  </div>
                          </ProgressTemplate>
                      </asp:UpdateProgress>--%>
                  
                    
                                  </span>
                                  
               
                 <div class="form-group">    
                  <div class="col-lg-10">
             
                    <div class="table-responsive1">

               <div id="pnl_gridview_display" runat="server" visible="false">            
            <asp:GridView runat="server" ID="gv_palnningdeatils" AutoGenerateColumns="False"  AllowPaging="true" 
            onrowcancelingedit="gv_palnningdeatils_RowCancelingEdit" RowStyle-Height="30" 
            onrowediting="gv_palnningdeatils_RowEditing" Font-Names="Verdana" Font-Size="12px"  PageSize="20"
            onrowupdating="gv_palnningdeatils_RowUpdating" Width="100%" 
            onrowdeleting="gv_palnningdeatils_RowDeleting" 
            onpageindexchanging="gv_palnningdeatils_PageIndexChanging" onrowdatabound="gv_palnningdeatils_RowDataBound" 
            >
      <RowStyle BackColor="#ffc9bb" ForeColor="#333333" />
        <Columns>
        <asp:TemplateField HeaderText="Sr.No" ItemStyle-Width="5%">
        <ItemTemplate>
        <center>
        <asp:Label runat="server" ID="lbl_srno" Text='<% # Eval("Row")%>'></asp:Label>
        </center>
        </ItemTemplate>
        </asp:TemplateField>
                       <asp:TemplateField HeaderText="Tasks details" ItemStyle-Width="35%">
                                    <ItemTemplate>
                                        <asp:Label ID="lbl_stage_id" runat="server" Text='<%# Eval("substage_id") %>' Visible="false"></asp:Label>
                                       <asp:Label runat="server" ID="lbl_subid" Text='<%# Eval("subsubstage_id") %>' Visible="false" ></asp:Label>
                                       <asp:Label ID="lblCName" runat="server" Text='<%# Eval("sub_sub_stage_desc")%>' 
                                               ></asp:Label></ItemTemplate>
                                                <EditItemTemplate>
                                          <asp:Label runat="server" ID="lbl_subid1" Text='<%# Eval("subsubstage_id") %>' Visible="false" ></asp:Label>
                                          <asp:TextBox ID="txt_sub_desc" runat="server" Text='<%# Eval("sub_sub_stage_desc")%>' 
                                                TextMode="MultiLine"  BorderColor="Black" BorderWidth="1px" Width="90%"></asp:TextBox></EditItemTemplate></asp:TemplateField>
                                              
                                                <asp:TemplateField HeaderText="Start Date" ItemStyle-Width="14%">
                                    <ItemTemplate>
                                       
                                            <asp:Label ID="lbl_startdate" runat="server" Text='<%# Eval("startdate_DATE")%>' Width="90px" 
                                                ></asp:Label></ItemTemplate><EditItemTemplate>
                                        
                                            <asp:TextBox ID="txt_startdate" runat="server" Text='<%# Eval("start_date")%>' 
                                                  BorderColor="Black" BorderWidth="1px" Enabled="false" Width="90%">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                </asp:TextBox>
                                                  <cc1:CalendarExtender ID="txtextender" runat="server" TargetControlID="txt_startdate" ></cc1:CalendarExtender>
                                                </EditItemTemplate></asp:TemplateField>
                                                <asp:TemplateField HeaderText="Completion Date" ItemStyle-Width="13%">
                                    <ItemTemplate>
                                       
                                            <asp:Label ID="lbl_pdc" runat="server" Text='<%# Eval("pdc1_DATE")%>' Enabled="true"
                                                ></asp:Label></ItemTemplate><EditItemTemplate>
                                        
                                            <asp:TextBox ID="txt_pdc" runat="server" Text='<%# Eval("PDC_date")%>' 
                                                 Enabled="false" BorderColor="Black" BorderWidth="1px" Width="90%" >
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                </asp:TextBox></EditItemTemplate></asp:TemplateField>
                                                <asp:TemplateField HeaderText="Total Days" ItemStyle-Width="8%">
                                    <ItemTemplate>
                                       <center>
                                            <asp:Label ID="lbl_totaldays" runat="server" Text='<%# Eval("total_days")%>' 
                                               ></asp:Label></ItemTemplate><EditItemTemplate>
                                        </center>
                                            <asp:TextBox ID="txt_totaldays" runat="server" Text='<%# Eval("total_days")%>' 
                                                 BorderColor="Black" BorderWidth="1px" Width="90%"></asp:TextBox></EditItemTemplate>
                                                </asp:TemplateField>
                                                
                                                <asp:TemplateField HeaderText="Estimated time (Minutes)" >
                                                <ItemTemplate>
                                                <center>
                                                    <asp:Label ID="Label4" runat="server" Text='<% # Eval("total_time") %>' ></asp:Label>
                                                    </center>
                                                </ItemTemplate>
                                                </asp:TemplateField>
                                                
                                                
                                                
                                                <asp:TemplateField HeaderText="Cost" ItemStyle-Width="10%">
                                    <ItemTemplate>
                                      
                                            <asp:Label ID="lbl_percost" runat="server" Text='<%# Eval("mainstage_cost")%>' 
                                                align="right" ></asp:Label>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                <asp:TextBox ID="txt_percost" runat="server" Text='<%# Eval("per_stage_cost")%>' 
                                                 BorderColor="Black" BorderWidth="1px" Width="100%">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                </asp:TextBox></EditItemTemplate></asp:TemplateField>
                                                <asp:TemplateField HeaderText="Percentages" ItemStyle-Width="10%" Visible="false">
                                    <ItemTemplate>
                                       
                                            <asp:Label ID="lbl_sub_percentage" runat="server" Text='<%# Eval("subsubstage_percentages")%>' 
                                               ></asp:Label></ItemTemplate><%--<EditItemTemplate>
                                        
                                            <asp:TextBox ID="txt_sub_percentage" runat="server" Text='<%# Eval("subsubstage_percentages")%>' BorderColor="Black" BorderWidth="1px" Width="100%"
                                                ></asp:TextBox>
                                                </EditItemTemplate>--%>
                                                
                                                </asp:TemplateField>
                                                
                                                    <asp:TemplateField HeaderText="" ItemStyle-Width="10%" >
                                            <ItemTemplate>
                                            <asp:Label runat="server" Text='<%# Eval("ename") %>'></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                   <div style="height:130px;overflow:auto;width:150px;line-height:20px;" class="shadow_five_edit_list1">
                                                <asp:CheckBoxList ID="chk_employee_list" runat="server" DataTextField="EName" DataValueField="EID" >
                                                </asp:CheckBoxList>
                                                    </div>                                      
                                                </EditItemTemplate>
                                                
                                                </asp:TemplateField>
                                                </Columns><Columns>
      
                            <asp:TemplateField ItemStyle-Width="10%" >
                            <ItemTemplate>
                               <asp:LinkButton ID="lnkDelete" runat="server" CommandName="Delete" Text="Delete" OnClientClick="javascript : return confirm('Do you really want to \ndelete the item?');">

                             </asp:LinkButton>
                             <br /><br />
                              <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Edit" Text="Edit"></asp:LinkButton> 
                            </ItemTemplate>
                            <EditItemTemplate >
                     <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="True" 
                            CommandName="Update" Text="Update" Width="10%"></asp:LinkButton>
                            <br /><br />
                        <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" 
                            CommandName="Cancel" Text="Cancel" Width="10%"></asp:LinkButton></EditItemTemplate>
                            </asp:TemplateField>
                            
                              <%--<asp:TemplateField ItemStyle-Width="60px">
        <ItemTemplate>
          <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                            CommandName="Edit" Text="Edit"></asp:LinkButton> 
                          
                            </ItemTemplate><EditItemTemplate>
                     <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="True" 
                            CommandName="Update" Text="Update"></asp:LinkButton>
                        <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" 
                            CommandName="Cancel" Text="Cancel"></asp:LinkButton></EditItemTemplate></asp:TemplateField>
                            --%>
                            
                            </Columns>
                             <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" CssClass="cssPager" />
                            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                            <AlternatingRowStyle BackColor="White" />
    
    </asp:GridView>
    
        <asp:Button ID="btn_send_project_for_approval" runat="server" 
            Text="Send For Approval" class="btn btn-primary"
            onclick="btn_send_project_for_approval_Click" />
            
           
             
          
       <%-- </asp:Panel>  --%>
       </div>
        </div>
        </div> 
        </div>        
               
               </div>                    
           
            </div>  
          
                 
               
                                 
            
                  </div>
                
                  
                  </div>
                  
                  </div>
                 <asp:Button ID="btn_popup21" runat="server" style="display:none;" Text="Popup" />
             <cc1:ModalPopupExtender ID="model_popup_show_cust_person_info" runat="server" 
                     PopupControlID="pnlCrDetails" BehaviorID="show_activity_stage_popup"
                    TargetControlID="btn_popup21" BackgroundCssClass="modelbackground1">
                </cc1:ModalPopupExtender>
        <asp:Panel ID="pnlCrDetails" runat="server" CssClass="categorypanel1" Width="50%" 
               style="margin-left:0px;margin-top:10px;height:450px;overflow:auto;"> 
        
        <table width="100%" style="border:Solid 2px #D46900;width:100%; height:450px"cellpadding="0" cellspacing="0">
<tr style="background-image:url(../images/header.gif)">
<td style="height:8px; color:White; font-weight:bold;padding:3px; font-size:larger; font-family:Calibri" align="left">

    <asp:Label ID="lbl_main_sub_stage_add_heading" runat="server" Text=""></asp:Label>

</td>
<td style=" color:White; font-weight:bold;padding:3px; font-size:larger" align="right">  
<a href="#" id="lnk_close_pop">  <img src="../images/Close.gif" alt="Close" style="border :0px" align="right"/> </a>

  </td>
</tr>
<tr>
<td colspan="2">


 <div runat="server" id="div_show_main_stage_add_from">
 
 
     <table width="100%" style="line-height:40px;">
       
        <tr>
        <td colspan="4">
         <asp:Label ID="lbl_project_name" runat="server" Text="Project Name :" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000" ></asp:Label>
  <asp:Label ID="lbl_main_stage_Project_name" runat="server" Text="" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"></asp:Label>
          </td>
             
        </tr>
       
        <tr>
        <td align="right">	Activity</td>
        <td><b style="color:Red;">*</b></td>
        <td colspan="2">
         <asp:TextBox ID="txt_main_stage_name" runat="server"  
             Width="200px"  ></asp:TextBox>

       <%-- </td>
         <td> --%>           
         <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Enter Activity" 
         ControlToValidate="txt_main_stage_name" ValidationGroup="12" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
        </tr>
        
          <tr>
        <td align="right">
    <%-- Main Stage--%> Cost
        </td>
        <td>
     
  <%--    <b style="color:Red;">*</b>--%>
        </td>
        <td colspan="2">
         <asp:TextBox ID="txt_Main_Stage_Cost" runat="server"  Width="110px" MaxLength="10"
                ></asp:TextBox>
                  <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers" TargetControlID="txt_Main_Stage_Cost">
                </cc1:FilteredTextBoxExtender>
                
            <%--AutoPostBack="true"     ontextchanged="txt_Main_Stage_Cost_TextChanged" 
             <asp:Label ID="lbl_mainstagecost_mag" runat="server" Text="" 
             Font-Names="Verdana" Font-Size="12px" ForeColor="Red" ></asp:Label>--%>
                
       
       <%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="Main Stage Cost"
         ControlToValidate="txt_Main_Stage_Cost" ValidationGroup="MS"></asp:RequiredFieldValidator></td></tr>--%>
        
    
 
            <tr>
        <td  align="right">
          	Start Date
                    </td><td>
     
      <b  id=B1  runat="server" style="color:Red;">*</b>
        </td>
                                      <td colspan="2">
             <asp:TextBox ID="txt_main_stage_Start_Date" runat="server"  Width="110px"></asp:TextBox>
             <cc1:CalendarExtender ID="CalendarExtender_start_date" runat="server"
                   TargetControlID="txt_main_stage_Start_Date" Format="dd/MM/yyyy">
                </cc1:CalendarExtender>
            
     <%--    </td>
<td>--%>
 <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ErrorMessage="Select End Date" ControlToValidate="txt_main_stage_Start_Date" 
ValidationGroup="12" ForeColor="Red"  ></asp:RequiredFieldValidator>

</td></tr>

 <tr>
        <td align="right" >Time (Days)</td>
        <td><b style="color:Red;">*</b></td>
        <td colspan="2">
        
         <asp:TextBox ID="txt_main_stage_Time_days" runat="server" Width="110px" MaxLength="4" onchange='return myjs();' ></asp:TextBox>       
               
            <%--ontextchanged="txt_main_stage_Time_days_TextChanged" AutoPostBack="true"--%>         
          

                 <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="Enter Time (Days)" 
         ControlToValidate="txt_main_stage_Time_days" ValidationGroup="12" ForeColor="Red"></asp:RequiredFieldValidator>
         
             <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="Numbers" TargetControlID="txt_main_stage_Time_days">
                </cc1:FilteredTextBoxExtender>
         <br />
              <asp:Label ID="lbl_main_stage_datecheck" runat="server" Text="" Font-Names="Verdana" Font-Size="12px" ForeColor="Red" ></asp:Label>
</td>
        </tr>
    <tr>
        <td align="right" >	End Date</td>
        <td>
        <%--<b style="color:Red;">*</b>--%>
        </td>
        <td colspan="2">
         <asp:TextBox ID="txt_main_stage_End_Date" runat="server"  
             Width="110px" Enabled="false"  ></asp:TextBox>
              <cc1:CalendarExtender ID="CalendarExtender4" runat="server"
                   TargetControlID="txt_main_stage_End_Date" Format="dd-MM-yyyy">
                </cc1:CalendarExtender>

      <%--  </td>
         <td>--%>       
          <%--    <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server"
               ErrorMessage="Enter 	End Date" ControlToValidate="txt_main_stage_End_Date" 
         ValidationGroup="MS" ForeColor="Red"></asp:RequiredFieldValidator>--%>
       
         
</td>
        </tr>
     <tr>
    <td align="right">Manager</td>
       <td><b style="color:Red;">*</b></td>
                <td>
                    <asp:DropDownList ID="ddl_main_stage_manager" runat="server" AppendDataBoundItems="true">
                    </asp:DropDownList>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
               ErrorMessage="Select Manager" InitialValue="-SELECT-" ControlToValidate="ddl_main_stage_manager" 
         ValidationGroup="12" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                    </tr>     

                 <tr>
                     <td colspan="2">
                      <b> <a style="color:Red;  padding-right:20px; float:right;">* Indicates Compulsory Fields</a></b>
                     </td>
                  <%--   <td>
                     </td>--%>
                      <td>
                      <input id="btn_Add_Activity" type="button" value="Submit" class="btn btn-primary"  validationgroup="12" />
                      
                        <%-- <asp:Button ID="btn_submit_main_stage" runat="server" CssClass="btn btn-primary" 
                              Text="Submit" ValidationGroup="MS" Width="100px" 
                              onclick="btn_submit_main_stage_Click" />--%>
                     </td>
                     <td align="center">
                      
                     </td>
                     <td>
                     </td>
                   
                 </tr>
                 <tr>
                     <td>
                     </td>
                     <td>
                     </td>
                     <td>
                         <asp:Label ID="lbl_main_stage_msg" runat="server" Font-Bold="true" 
                             ForeColor="Red" Text=""></asp:Label>
                     </td>
                     <td>
                     </td>
                 </tr>
                 
                   <tr>
                     <td>
                     </td>
                     <td>
                     </td>
                     <td>
                        &nbsp;
                     </td>
                     <td>
                     </td>
                 </tr>
                  <tr>
                     <td>
                     </td>
                     <td>
                     </td>
                     <td>
                        &nbsp;
                     </td>
                     <td>
                     </td>
                 </tr>
       <asp:HiddenField ID="HiddenField1" runat="server" />
        </table>
     
   
       </div>

        
   
  <div runat="server" id="sub_stage_Popup">
 
 
     <table width="100%" >
       
        <tr>
        <td colspan="4">
         <asp:Label ID="Label72" runat="server" Text="Project Name :" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
            ForeColor="#cc0000" ></asp:Label>
  <asp:Label ID="lbl_Project_name_val" runat="server" Text="" Font-Bold="true" Font-Size="14px" Font-Names="Verdana"
             ></asp:Label>
           
                <br />
          
                <asp:Label ID="Label84" runat="server" Font-Bold="true" Font-Names="Verdana" 
                    Font-Size="14px" ForeColor="#cc0000" Text="Activity :"></asp:Label>
                <asp:Label ID="lbl_Mainstage_name_val" runat="server" Font-Bold="true" 
                    Font-Names="Verdana" Font-Size="14px" Text=""></asp:Label>
          </td>
             
        </tr>
          <tr>
       
        <td  colspan="2" align ="left"> 
        
         <asp:Label ID="Label2" runat="server" Font-Bold="true" Font-Names="Verdana" 
                    Font-Size="14px" ForeColor="#cc0000" Text="Start Date :"></asp:Label>
                <asp:Label ID="lbl_MAIN_stage_start_date" runat="server" Font-Bold="true" 
                    Font-Names="Verdana" Font-Size="14px" Text=""></asp:Label>
                    
                   
        <%--<h2> Add Sub Stages  </h2>--%>
        
        </td>
        <td colspan="2">
           <asp:Label ID="Label6" runat="server" Font-Bold="true" Font-Names="Verdana" 
                    Font-Size="14px" ForeColor="#cc0000" Text="End Date	:"></asp:Label>
                <asp:Label ID="lbl_main_stage_end_date" runat="server" Font-Bold="true" 
                    Font-Names="Verdana" Font-Size="14px" Text=""></asp:Label>
        </td>
           
               
               
             
        </tr>
        <tr>
        <td align="right">Stage Name</td>
        <td><b style="color:Red;">*</b></td>
        <td colspan="2">
         <asp:TextBox ID="txt_substage" runat="server"  
             Width="200px"  ></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator37" runat="server" ErrorMessage="Enter sub stage Name" ControlToValidate="txt_substage"
                 ValidationGroup="15" ForeColor="Red"></asp:RequiredFieldValidator>

        </td>

        </tr>
        
          <tr>
        <td align="right">
       Start Date
        </td>
        <td>
     
      <b style="color:Red;">*</b>
        </td>
        <td colspan="2">
         <asp:TextBox ID="txtstartdate11" runat="server"  Width="110px" ></asp:TextBox><%--Enabled="false"--%>
         <cc1:CalendarExtender ID="CalendarExtender2" runat="server"
                    Enabled="True" TargetControlID="txtstartdate11" Format="dd/MM/yyyy">
                    </cc1:CalendarExtender>
                     <asp:RequiredFieldValidator ID="RequiredFieldValidator36" runat="server" ErrorMessage="Select  Start Date" 
        ControlToValidate="txtstartdate11" ValidationGroup="15" ForeColor="Red"></asp:RequiredFieldValidator>
                   </td>
                  
        
        </tr>
        
    
  <tr>
        <td align="right" >Days</td>
        <td><b style="color:Red;">*</b></td>
        <td colspan="2">
        
         <asp:TextBox ID="Dayscount" runat="server" Width="110px" MaxLength="4"></asp:TextBox> <%--ontextchanged="txt_Dayscount_days_TextChanged" AutoPostBack="true"--%>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Enter days count" ControlToValidate="Dayscount"
                         ValidationGroup="15" ForeColor="Red"></asp:RequiredFieldValidator>
                         
                          <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" FilterType="Numbers" TargetControlID="Dayscount">
                </cc1:FilteredTextBoxExtender>

                      <br />
              <asp:Label ID="lbl_total_days_msgnew" runat="server" Text="" Font-Names="Verdana" Font-Size="12px" ForeColor="Red" ></asp:Label>
        </td>
   
        </tr>
            <tr>
        <td  align="right">
            End Date
                    </td><td>
     
      <%--<b  id=star  runat="server" style="color:Red;">*</b>--%>
        </td>
                                      <td colspan="2">
             <asp:TextBox ID="txtDate11" runat="server"  Width="110px"   Enabled="false" ></asp:TextBox>
             <cc1:CalendarExtender ID="CalendarExtender3" runat="server"
                    Enabled="false" TargetControlID="txtDate11" Format="dd-MMM-yyyy">
                </cc1:CalendarExtender>
                 <br />
              <asp:Label ID="lbl_end_date_msg" runat="server" Text="" Font-Names="Verdana" Font-Size="12px" ForeColor="Red" ></asp:Label>

              <%--   <asp:RequiredFieldValidator ID="RequiredFieldValidator38" runat="server" ErrorMessage="Select End Date" ControlToValidate="txtDate11" 
ValidationGroup="15" ForeColor="Red"  ></asp:RequiredFieldValidator>--%>
            
         </td>
</tr>
    <tr>
        <td align="right" >Cost</td>
        <td>
     <%--   <b style="color:Red;">*</b>--%>
        </td>
        <td>
         <asp:TextBox ID="txtCost" runat="server" Width="110px" MaxLength="10" ></asp:TextBox>

<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" FilterType="Numbers" TargetControlID="txtCost">
                </cc1:FilteredTextBoxExtender>

        </td>
         <td> 
                  <%--  <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Enter Project Cost" 
         ControlToValidate="txtCost" ValidationGroup="15"></asp:RequiredFieldValidator>--%>
</td>
        </tr>
        
        <tr>
        <td align="right">Allow Task</td>
          <td></td>
            <td>
                <asp:CheckBox ID="chk_allow_sub_sub_stage" runat="server" Text="Allow Task" Checked="true" />
             <br />
          
      <%--    <span style="color:Green;">
              [Sub sub stages is required then check this check box.]
              </span>
            --%>
            </td>
              <td></td>
        </tr>
        
 
     
    
               <tr >
        
        <td align="right" colspan="1"> Select Employee Name</td>
                       
                        <td colspan="2">
                        <div class="col-lg-10">
                            <div class="shadow_five1" 
                                style="height:130px;overflow:auto;width:250px;line-height:20px;">
                                
                                  <div id="div_employee_checkbox_list">
                       </div>
                                <%--<asp:CheckBoxList ID="ddl_employee11" runat="server" 
                                    DataTextField="EName" DataValueField="EID"  
                                    Font-Names="Verdana" Font-Size="11px">
                                </asp:CheckBoxList>--%>
                            
                            </div>
                        </div>
                      
                   </td>
                   <td valign="middle">
                      <asp:Label ID="lbl_select_emp_msg" runat="server" Text="" ForeColor="Red"></asp:Label>
                   </td>
     
        </tr>
        
        
     <tr><td class="style2"></td></tr>
    <tr><td class="style2"></td></tr>
    <tr><td class="style2"></td></tr>
    <tr><td class="style2"></td></tr>
     <tr><td class="style2"></td></tr>

                 <tr>
                     <td>
                     </td>
                     <td>
                     </td>
                      <td>
                       <b> <a style="color:Red;  padding-right:20px; float:right;">* Indicates Compulsory Fields</a></b>
                     </td>
                     <td align="center">
                     
                     <input id="btn_submit_update_stage" type="button" value="Submit" class="btn btn-primary" validationgroup="15"   width="100px"  />
                     
                      <%--   <asp:Button ID="btn_Submit_substage" runat="server" onclick="btn_Submit_substage_click"
                             CssClass="btn btn-primary" Text="Submit" ValidationGroup="15" Width="100px" />--%>
                     </td>
                     <td>
                     </td>
                   
                 </tr>
                 <tr>
                     <td>
                     </td>
                     <td>
                     </td>
                     <td>
                         <asp:Label ID="lbl_substage" runat="server" Font-Bold="true" 
                             ForeColor="Red" Text=""></asp:Label>
                     </td>
                     <td>
                     </td>
                 </tr>
       <asp:HiddenField ID="hf_substage_Row" runat="server" />
        </table>
     
   
       </div>
   
   
<%--   <b> <a style="color:Red;  padding-right:20px; float:right;">* Indicates Compulsory Fields</a></b>--%>
   
       </td></tr></table>

    </asp:Panel>  

         
  <%--  </ContentTemplate>
        </asp:UpdatePanel>
--%>
 
    </form>
</body>
</html>
