<%@ page language="C#" autoeventwireup="true" inherits="html_FillDetails, App_Web_0lvmswnc" enableeventvalidation="false" %>
<%@ 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" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

         <link href="../ServiceCss/bootstrap.css" rel="stylesheet" type="text/css" />
         <link href="../ServiceCss/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
         <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>
               <style type="text/css">
     .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%;
        }
         .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;

}
     
        .style1
        {
            height: 6%;
        }
        
            .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:auto;
         }
              .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;
        	
        
        }
     
    </style>
    
               <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
               
               
               <script type="text/javascript">
                       function GetCurrentTime() {
                           alert(String.format("{0}:{1}:{2} {3}"
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val()
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val()
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtSecond]').val()
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtAmPm]').val()));

                           return false;
                       }
                      </script>
               
               <script type="text/javascript">
                    $().ready(function() {
                    $("#div_lnk_date_change_link").hide();
                    $("#div_request_per_centages").hide();
                   
                   })
                   </script>
               <script type="text/javascript">
                   $().ready(function () {

                       //Bind Project List as per Client selection

                       $("#div_service").hide();
                       $("[id*=ddl_client]").change(function () {



                           $("#subsubstage_ddl").hide();
                           $("#div_lnk_date_change_link").hide();
                           $("#div_request_per_centages").hide();
                           var CID = $("[id*=ddl_client]").find("option:selected").val();
                           $.ajax({
                               type: "post",
                               url: "FillDetails.aspx/Bind_project_name_list",
                               data: "{user_id:'" + hf_user_id.value + "',CID:'" + CID + "',EID:'" + hf_EID.value + "'}",
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (response) {

                                   $("[id*=ddl_projectclientwise]").empty();
                                   $("<option value='-Select-'>-Select-</option>").appendTo("[id*=ddl_projectclientwise]");
                                   $.each(response.d, function () {

                                       $("<option value=" + this['Prid'] + ">" + this['PName'] + "</option>").appendTo("[id*=ddl_projectclientwise]");

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

                       });


                       $("[id*=ddl_projectclientwise]").change(function () {
                           //   var project_id = $("#ddl_projectclientwise").find("option:selected").val();
                           //var project_id = $("[id*=ddl_projectclientwise]").val();
                           var project_id = $(this).find("option:selected").val();
                           $("[id*=ddl_sub_stages_list]").empty();

                           $("[id*=ddl_subsubstage]").empty();
                           $("[id*=hf_sub_sub_stage_id]").val('');
                           $("[id*=hf_sub_stage_id]").val('');

                           //                           alert(project_id);
                           $.ajax({
                               type: "post",
                               url: "FillDetails.aspx/Bind_project_wise_Activity",
                               data: "{user_id:'" + hf_user_id.value + "',project_id:'" + project_id + "'}",
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (response) {

                                   $("[id*=ddl_projectmain_stage]").empty();
                                   $("<option value='-Select-'>-Select-</option>").appendTo("[id*=ddl_projectmain_stage]");
                                   $.each(response.d, function () {
                                       $("[id*=ddl_projectmain_stage]").append($("<option></option>").val(this['Mainstage_ID']).html(this['Mainstage_name']));
                                   });
                               },
                               failure: function (response) {
                                   // alert("Test");
                               }
                           });

                       });



                       $("[id*=ddl_projectmain_stage]").change(function () {
                           //   var project_id = $("#ddl_projectclientwise").find("option:selected").val();
                           $("[id*=hf_sub_sub_stage_id]").val('');
                           var project_id = $("[id*=ddl_projectclientwise]").val();
                           var Mainstage_ID = $(this).find("option:selected").val();
                           $("[id*=hf_main_stage_id]").val(Mainstage_ID);

                           $.ajax({
                               type: "post",
                               url: "FillDetails.aspx/Bind_Mainstages_wise_sub_stages_list",
                               data: "{user_id:'" + hf_user_id.value + "',project_id:'" + project_id + "',Mainstage_ID:'" + Mainstage_ID + "'}",
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (response) {

                                   $("[id*=ddl_sub_stages_list]").empty();
                                   $("<option value='-Select-'>-Select-</option>").appendTo("[id*=ddl_sub_stages_list]");
                                   $.each(response.d, function () {
                                       $("[id*=ddl_sub_stages_list]").append($("<option></option>").val(this['substage_id']).html(this['sub_stage_desc']));
                                   });
                               },
                               failure: function (response) {
                                   // alert("Test");
                               }
                           });

                       });

                       $("[id*=ddl_Comple_ted]").change(function () {

                           var vv = $("[id*=ddl_Comple_ted]").val();
                           if (vv == "Completed") {
                               $("#div_work_done_today").hide();
                               $("#txt_percentages").val($("input[id$=hf_remaining_perc]").val());
                               document.getElementById("RequiredFieldValidator4").enabled = false;
                           }
                           else {
                               $("#txt_percentages").val('');
                               $("#div_work_done_today").show();
                               document.getElementById("RequiredFieldValidator4").enabled = true;

                           }

                       });


                       $("[id*=rb_plan_work]").click(function () {
                           $("#project_report").show();
                           $("#div_work_done_today").show();
                           $("#ddlvisit").show();
                           $("#div_Enter_Percentage").show();
                           $("#div_Task_Completed").show();
                           $("#div_service").hide();
                           $("#div_btn").show();
                       });

                       $("[id*=rb_non_plan]").click(function () {
                           $("#project_report").show();
                           $("#div_btn").show();
                           $("#div_service").hide();
                           $("#div_work_done_today").show();
                           $("#ddlvisit").hide();
                           $("#div_Enter_Percentage").hide();
                           $("#div_Task_Completed").hide();
                           $("#div_work_done_today").hide();
                           document.getElementById("RequiredFieldValidator5").enabled = false;


                       });

                       $("[id*=rb_fill_service]").click(function () {
                        //   alert("ss");
                           
                           $("#div_btn").hide();
                           $("#project_report").hide();
                           $("#div_service").show();
                           $("#div_work_done_today").hide();
                           $("#ddlvisit").hide();
                           $("#div_Enter_Percentage").hide();
                           $("#div_Task_Completed").hide();

                       });


                       $("[id*=ddl_sub_stages_list]").change(function () {

                           $("[id*=hf_sub_sub_stage_id]").val("");
                           var substage_id = $(this).find("option:selected").val();
                           $("[id*=hf_sub_stage_id]").val(substage_id);
                           $("[id*=hf_task_id]").val("");
                           var empid = 0;
                           var Mainstage_ID = $("[id*=ddl_projectmain_stage]").val()
                           var plan_non_plan = 0;
                           if ($('#rb_plan_work').is(':checked')) {
                               plan_non_plan = 1;
                           }
                           else {
                               plan_non_plan = 0;
                           }
                           $.ajax({
                               type: "post",
                               url: "FillDetails.aspx/Bind_substage_wise_sub_sub_stages_list",
                               data: "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',plan_non_plan:'" + plan_non_plan + "',EMPid:'" + hf_EID.value + "'}",
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (response) {

                                   $("[id*=ddl_subsubstage]").empty();
                                   $("<option value='-Select-'>-Select-</option>").appendTo("[id*=ddl_subsubstage]");
                                   var p = 0;
                                   $.each(response.d, function () {
                                       p++;
                                       $("[id*=ddl_subsubstage]").append($("<option></option>").val(this['substage_id']).html(this['sub_stage_desc']));
                                   });
                                   if (p > 0) {
                                       $("#subsubstage_ddl").show();
                                   }
                                   else {

                                       $("[id*=hf_sub_sub_stage_id]").val("");
                                       $("#subsubstage_ddl").hide();

                                       $('#<%=lbl_ms_g_for_add_task.ClientID%>').html("");


                                       sub_stage_subsub_stage_start_end_date(substage_id, '0', 'N');
                                       Remaining_percentages(substage_id, Mainstage_ID, '0', 'N');
                                       Show_compl_etion_date_POPUP(substage_id, Mainstage_ID, '0', 'N');

                                       check_task_allow_or_not(substage_id);

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

                       });

                     


                       $("[id*=ddl_subsubstage]").change(function () {

                           var sub_sub_stage_id = $(this).find("option:selected").val();
                           var Mainstage_ID = $("[id*=ddl_projectmain_stage]").val()
                           var substage_id = $("[id*=ddl_sub_stages_list]").val();

                           $("[id*=hf_sub_sub_stage_id]").val(sub_sub_stage_id);

                           $("[id*=hf_task_id]").val(sub_sub_stage_id);
                           sub_stage_subsub_stage_start_end_date(substage_id, sub_sub_stage_id, 'Y');
                           Remaining_percentages(substage_id, Mainstage_ID, sub_sub_stage_id, 'Y');
                           Show_compl_etion_date_POPUP(substage_id, Mainstage_ID, sub_sub_stage_id, 'Y');

                       });
                   });

                   function check_task_allow_or_not(substage_id) {

                       $.ajax({
                           type: "post",
                           url: "FillDetails.aspx/check_allow_task_or_not",

                           data: "{substageid:'" + substage_id + "'}",
                           contentType: "application/json; charset=utf-8",
                           dataType: "json",
                           success: function(response) {
                               var allow = response.d;
                               if (allow == "0") {
                                   $('#<%=lbl_ms_g_for_add_task.ClientID%>').html("");                                
                               }
                               else {

                                   $('#<%=lbl_ms_g_for_add_task.ClientID%>').html("This stage allowed task please add task and then fill the report.");
                                   
                               }
                              
                           }
                       });
                   }               
                   function sub_stage_subsub_stage_start_end_date(substage_id, subsubstage_id, subsubYesNo) {
                       var val_url = ""; 
                       var dataval="";
                       if (subsubYesNo == "N") {
                              val_url ="FillDetails.aspx/Bind_sub_stage_start_end_date";
                              dataval="{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "'}";
                       }
                       else {
                          val_url = "FillDetails.aspx/Bind_sub_sub_stage_start_end_date";
                          dataval = "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',subsubstage_id:'" + subsubstage_id + "'}";
                       }
                       $.ajax({
                           type: "post",
                           url: val_url,
                           data: dataval,
                           contentType: "application/json; charset=utf-8",
                           dataType: "json",
                           success: function(response) {

                               var start_end_date = response.d;
                               var arr = start_end_date.split(',');
                               $('#txt_startdate').val(arr[0]);

                               $('#txt_pdcdate').val(arr[1]);

                           }
                       });
                   }

                   function Remaining_percentages(substage_id, Mainstage_ID, subsubstage_id, subsubYesNo) {

                       var val_url = "";
                       var dataval = "";
                       if (subsubYesNo == "N") {
                           val_url = "FillDetails.aspx/show_Remaining_percentages";
                           dataval = "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',Mainstage_ID:'" + Mainstage_ID + "'}";
                       } else {

                       val_url = "FillDetails.aspx/show_Remain_ing_percen_tages_subsub_stage";
                       dataval = "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',Mainstage_ID:'" + Mainstage_ID + "',subsubstage_id:'" + subsubstage_id + "'}";
                       }
                       $.ajax({
                           type: "post",
                           url: val_url,
                           data: dataval,
                           contentType: "application/json; charset=utf-8",
                           dataType: "json",
                           success: function(response) {

                               var Remain_percentages = response.d;

                               $("[id*=hf_remaining_perc]").val(Remain_percentages);
                               var msg = '[ Remaining =' + Remain_percentages + '%]';
                               $('#<%=lbl_Remaining_percentages.ClientID%>').html(msg);

                               if (Remain_percentages <= 0) {
                                   $("#div_request_per_centages").show();
                                   $('#<%=lbl_message.ClientID%>').html("This stage 100% Completed.");
                                   $("#tr_lbl_da_te_compl_etion_msg").hide();
                                   $("#tr_lnk_d_ate_appro_val").hide();
                                   $("#div_pop_up_req_uest_per_cent_ages").show();
                                   $('#<%=lbl_msg_for_percentages.ClientID%>').html("<br/><br/><br/>&nbsp;&nbsp;&nbsp;This stage 100% Completed.");
                                   $find("POpUp_for_percentages_date_approval").show();


                               }
                               else {
                                   if (Remain_percentages <= 10) {

                                       $("#div_request_per_centages").show();
                                       $('#<%=lbl_message.ClientID%>').html("This stage 100% Completed.");
                                       $("#tr_lbl_da_te_compl_etion_msg").hide();
                                       $("#tr_lnk_d_ate_appro_val").hide();
                                       $("#div_pop_up_req_uest_per_cent_ages").show();
                                       var aa = 100 - Remain_percentages;
                                       $('#<%=lbl_msg_for_percentages.ClientID%>').html("<br/><br/><br/>&nbsp;&nbsp;&nbsp;This stage " + aa + "% Completed.");
                                       $find("POpUp_for_percentages_date_approval").show();


                                       $('#<%=lbl_message.ClientID%>').html("");
                                   }
                                   else {

                                   }
                                   //                                   $('#<%=lbl_message.ClientID%>').html("");
                               }

                           }
                       });

                   }


                   function Show_compl_etion_date_POPUP(substage_id, Mainstage_ID, subsubstage_id, subsubYesNo) {
                   
                       var val_url = "";
                       var dataval = "";
                       if (subsubYesNo == "N") {
                           val_url = "FillDetails.aspx/check_completion_date_over_or_not";
                           dataval = "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',Mainstage_ID:'" + Mainstage_ID + "'}";
                       } else {

                       val_url = "FillDetails.aspx/check_sub_sub_stage_completion_date_over_or_not";
                           dataval = "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',Mainstage_ID:'" + Mainstage_ID + "',subsubstage_id:'" + subsubstage_id + "'}";
                       }

                       $.ajax({
                           type: "post",
                           url: val_url,
                           data: dataval,
                           contentType: "application/json; charset=utf-8",
                           dataType: "json",
                           success: function(response) {
                               //   lbl_Remaining_percentages.Text = "[ Remaining = " + r + "% ]";
                               var completion_date_over_msg = response.d;

                               if (completion_date_over_msg == "This sub stage 100% Completed.") {

                                   $("#div_request_per_centages").show();
                                   $('#<%=lbl_message.ClientID%>').html("This stage 100% Completed.");
                                   $("#tr_lbl_da_te_compl_etion_msg").hide();
                                   $("#tr_lnk_d_ate_appro_val").hide();
                                   $("#div_pop_up_req_uest_per_cent_ages").show();
                                   $('#<%=lbl_msg_for_percentages.ClientID%>').html("<br/><br/><br/>&nbsp;&nbsp;&nbsp;This stage 100% Completed.");
                                   $find("POpUp_for_percentages_date_approval").show();
                                   $("#div_lnk_date_change_link").hide();

                               }
                               else if (completion_date_over_msg == "5 days remaining for completion date. If you have required more days please send request for date Extend.") {


                                   $("#div_lnk_date_change_link").hide();
                                   $('#<%=lbl_date_completion_msg.ClientID%>').html("5 days remaining for completion date. If you have required more days please send request for date Extend.");
                                   $("#tr_lbl_da_te_compl_etion_msg").show();
                                   $("#tr_lnk_d_ate_appro_val").show();
                                   $("#div_pop_up_req_uest_per_cent_ages").hide();
                                   $('#<%=lbl_msg_for_percentages.ClientID %>').html("");
                                   $find("POpUp_for_percentages_date_approval").show();
                                   $('#<%=lbl_message.ClientID%>').html("");
                               }
                               else
                                   if (completion_date_over_msg == "4 days remaining for completion date. If you have required more days please send request for date Extend.") {


                                   $("#div_lnk_date_change_link").hide();
                                   $('#<%=lbl_date_completion_msg.ClientID%>').html("4 days remaining for completion date. If you have required more days please send request for date Extend.");
                                   $("#tr_lbl_da_te_compl_etion_msg").show();
                                   $("#tr_lnk_d_ate_appro_val").show();
                                   $("#div_pop_up_req_uest_per_cent_ages").hide();
                                   $('#<%=lbl_msg_for_percentages.ClientID %>').html("");
                                   $find("POpUp_for_percentages_date_approval").show();
                                   $('#<%=lbl_message.ClientID%>').html("");
                               }

                               else
                                   if (completion_date_over_msg == "3 days remaining for completion date. If you have required more days please send request for date Extend.") {


                                   $("#div_lnk_date_change_link").hide();
                                   $('#<%=lbl_date_completion_msg.ClientID%>').html("3 days remaining for completion date. If you have required more days please send request for date Extend.");
                                   $("#tr_lbl_da_te_compl_etion_msg").show();
                                   $("#tr_lnk_d_ate_appro_val").show();
                                   $("#div_pop_up_req_uest_per_cent_ages").hide();
                                   $('#<%=lbl_msg_for_percentages.ClientID %>').html("");
                                   $find("POpUp_for_percentages_date_approval").show();
                                   $('#<%=lbl_message.ClientID%>').html("");
                               }

                               else
                                   if (completion_date_over_msg == "2 days remaining for completion date. If you have required more days please send request for date Extend.") {



                                   $("#div_lnk_date_change_link").hide();
                                   $('#<%=lbl_date_completion_msg.ClientID%>').html("2 days remaining for completion date. If you have required more days please send request for date Extend.");
                                   $("#tr_lbl_da_te_compl_etion_msg").show();
                                   $("#tr_lnk_d_ate_appro_val").show();
                                   $("#div_pop_up_req_uest_per_cent_ages").hide();
                                   $('#<%=lbl_msg_for_percentages.ClientID %>').html("");
                                   $find("POpUp_for_percentages_date_approval").show();
                                   $('#<%=lbl_message.ClientID%>').html("");
                               }
                               else
                                   if (completion_date_over_msg == "1 days remaining for completion date. If you have required more days please send request for date Extend.") {


                                   $("#div_lnk_date_change_link").hide();
                                   $('#<%=lbl_date_completion_msg.ClientID%>').html("1 days remaining for completion date. If you have required more days please send request for date Extend.");
                                   $("#tr_lbl_da_te_compl_etion_msg").show();
                                   $("#tr_lnk_d_ate_appro_val").show();
                                   $("#div_pop_up_req_uest_per_cent_ages").hide();
                                   $('#<%=lbl_msg_for_percentages.ClientID %>').html("");
                                   $find("POpUp_for_percentages_date_approval").show();
                                   $('#<%=lbl_message.ClientID%>').html("");

                               }

                               else
                                   if (completion_date_over_msg == "Planned completion date over.") {

                                       $("[id*=hf_planed_completion_date_over]").val(1);
                                       

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

                                   $('#<%=lbl_date_completion_msg.ClientID%>').html("Planned completion date over.");
                                   $("#tr_lbl_da_te_compl_etion_msg").show();
                                   $("#tr_lnk_d_ate_appro_val").show();
                                   $("#div_pop_up_req_uest_per_cent_ages").hide();
                                   $('#<%=lbl_msg_for_percentages.ClientID %>').html("");
                                   $find("POpUp_for_percentages_date_approval").show();
                                   $('#<%=lbl_message.ClientID%>').html("");

                               }
                               else {
                                   $("#div_lnk_date_change_link").hide();
                               }
                           }
                       });
                   }






                   $(document).ready(function () {
                       $("#txt_total_Minutes").change(function (event) {


                           var t_minutes = $('#txt_total_Minutes').val();

                           var start_time = String.format("{0}:{1}"
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val()
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val());

                           $.ajax({
                               type: "POST",
                               url: "FillDetails.aspx/find_endtimepicker",
                               data: "{start_time:'" + start_time + "',Minutes:'" + t_minutes + "'}",
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (r) {


                                   var str = r.d;
                                   var res = str.split(":");

                                   $("[id*=hf_set_end_time_to_start_time]").val(str);

                                   $('[id*=TimeSelector_end_time]').find('[id*=txtHour]').val(res[0]);
                                   $('[id*=TimeSelector_end_time]').find('[id*=txtMinute]').val(res[1]);


                               }
                           });

                           find_total_time(hf_EID.value, hf_user_id.value);



                       });

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

                           var percentages = $('#txt_percentages').val();
                           // alert(percentages);
                           var substage_id = $("[id*=ddl_sub_stages_list]").val();
                           //alert(substage_id);
                           if (percentages == "") {
                               percentages = "1";
                           }
                           var sub_sub_stage_id = $('input[id$=hf_sub_sub_stage_id]').val();
                           // alert(sub_sub_stage_id);
                           var dataurl = "";
                           var dataval = "";
                           if (sub_sub_stage_id == "") {
                               dataurl = "FillDetails.aspx/Enter_Percen_tagesub_sta_ge";
                               dataval = "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',percentages:" + percentages + "}";
                           }
                           else {
                               dataurl = "FillDetails.aspx/Enter_Percentage_sub_sub_stage";
                               dataval = "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',subsubstage_id:'" + sub_sub_stage_id + "',percentages:'" + percentages + "'}";
                           }

                           $.ajax({
                               type: "post",
                               url: dataurl,
                               data: dataval,
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (response) {
                                   var ssss = response.d;
                                   if (ssss == "") {
                                       $('#<%=lbl_cost_msg.ClientID%>').html("");
                                   }
                                   else {

                                       $('#<%=lbl_cost_msg.ClientID%>').html(ssss);
                                   }
                               }
                           });
                       });


                       $('#fileupload').on("change", function () {

                           var filepath1 = "";
                           var fileUpload = $("#fileupload").get(0);
                           var files = fileUpload.files;

                           var data = new FormData();
                           for (var i = 0; i < files.length; i++) {
                               data.append(files[i].name, files[i]);
                           }

                           $.ajax({
                               url: "FileUploadHandler.ashx",
                               type: "POST",
                               data: data,
                               contentType: false,
                               processData: false,
                               success: function (result) {
                                   filepath1 = result;
                                   $("#hf_file_path").val(filepath1);
                                   //  alert(filepath1);
                                   //   hf_file_path
                                   // alert(sss);
                               },
                               error: function (err) {
                                   //alert(err.statusText)
                               }
                           });


                       });

                        $("[id*=btnSubmit_visit_details]").click(function () {



                           if (Page_ClientValidate(1)) {

                               if ($('#<%=lbl_cost_msg.ClientID%>').html() == "You have entered percentages greater than 100%.")
                               {
                                   alert("You have entered percentages greater than 100%.");
                               }
                               else
                               {
                                   var percentages = $("#txt_percentages").val();
                                  // alert("Test"+percentages);

                               var subsubstage_id = $('input[id$=hf_sub_sub_stage_id]').val();

                               var Mainstage_ID = $("[id*=ddl_projectmain_stage]").val()

                               var substage_id = $("[id*=ddl_sub_stages_list]").val();
                               var project_id = $("[id*=ddl_projectclientwise]").val();
                               var client_id = $("[id*=ddl_client]").val();

                               var work_details = "";
                               var ss = $("[id*=ddl_Comple_ted]").val();

                               if (ss == "Completed") {
                                   work_details = "Completed";
                               }
                               else {
                                   work_details = $('#txt_sub_stages_progress').val();
                               }
                               var Cost_val = ("");
                               var remark = $('#txtremark').val();
                               var food_desc = ("");
                               var travel_expenses = ("");
                              // alert(travel_expenses);
                               var travel_desc = ("");
                               //alert(travel_desc);
                               var mtrl_txt = ("");
                               //alert(mtrl_txt);
                               var mtrl_desc = ("");
                              // alert(mtrl_desc);
                               var ExpensesDesc = ("");
                              // alert(ExpensesDesc);
                               var ExpensesDesc = ("");
                               var _mom_Title = $('#txt_mom_Title').val();
                               var _Brief_discussion = $('#txt_Brief_discussion').val();
                               var _action = $('#txt_action').val();
                               var path = $('input[id$=hf_file_path]').val();
                               var otherExpenses = ("");
                               var otherExpensesDesc = ("");


                               var start_time = String.format("{0}:{1}"
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val()
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val());

                               // alert(start_time);
                               var end_time = String.format("{0}:{1}"
                        , $('[id*=TimeSelector_end_time]').find('[id*=txtHour]').val()
                        , $('[id*=TimeSelector_end_time]').find('[id*=txtMinute]').val());
                               //  alert(end_time);


                               var dateover_or_not = $('input[id$=hf_planed_completion_date_over]').val();
                               if (dateover_or_not == "1") {
                               }
                               else {
                                   dateover_or_not = "0";
                               }
                                   
                               $.ajax({
                                   type: "POST",
                                   url: "FillDetails.aspx/Add_work_details",
                                   data: "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',Mainstage_ID:'" + Mainstage_ID + "',subsubstage_id:'" + subsubstage_id + "',project_id:'" + project_id + "',client_id:'" + client_id + "',work_details:'" + work_details + "',percentages:'" + percentages + "',Cost_val:'" + Cost_val + "',ExpensesDesc:'" + ExpensesDesc + "',travel_expenses:'" + travel_expenses + "',travel_desc: '" + travel_desc + "', mtrl_txt:'" + mtrl_txt + "',mtrl_txtdesc:'" + mtrl_desc + "',empid:'" + hf_EID.value + "',_mom_Title:'" + _mom_Title + "',_Brief_discussion:'" + _Brief_discussion + "',_action:'" + _action + "',path:'" + path + "',start_time:'" + start_time + "',end_time:'" + end_time + "',dateover_or_not:'" + dateover_or_not + "',remark:'" + remark + "',otherExpenses:'" + otherExpenses + "',otherExpensesDesc:'" + otherExpensesDesc + "'}",
                                   contentType: "application/json; charset=utf-8",
                                   dataType: "json",
                                   success: function (r) {
                                       alert("Record inserted successfully");
                                       //document.location.href = "FillDetails.aspx";
                                       $("[id*=hf_sub_sub_stage_id]").val('');
                                       $("[id*=hf_planed_completion_date_over]").val('');
                                       $('#txt_percentages').val('');
                                       $('#txt_sub_stages_progress').val('');
                                       $('#txt_cost').val('');
                                       $('#txt_sub_expenses').val('');
                                       $('#txt_mom_Title').val('');
                                       $('#txt_Brief_discussion').val('');
                                       $('#txt_action').val('');
                                       // ddl_item_name
                                       //  ddl_itemlist
                                       $('#txt_quantity_expences').val('');
                                       $("#div_work_done_today").show();
                                       $("#ddl_Comple_ted option:first").attr("selected", true);
                                       $("#ddl_subsubstage option:first").attr("selected", true);

                                       var str = $('input[id$=hf_set_end_time_to_start_time]').val();
                                       var res = str.split(":");

                                       $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val(res[0]);
                                       $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val(res[1]);

                                       var plan_non_plan = 0;
                                       if ($('#rb_plan_work').is(':checked')) {
                                           plan_non_plan = 1;
                                       }
                                       else {
                                           plan_non_plan = 0;
                                       }


                                       $.ajax({
                                           type: "post",
                                           url: "FillDetails.aspx/Bind_substage_wise_sub_sub_stages_list",
                                           data: "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',plan_non_plan:'" + plan_non_plan + "'}",
                                           contentType: "application/json; charset=utf-8",
                                           dataType: "json",
                                           success: function (response) {

                                               $("[id*=ddl_subsubstage]").empty();
                                               $("<option value='-Select-'>-Select-</option>").appendTo("[id*=ddl_subsubstage]");
                                               var p = 0;
                                               $.each(response.d, function () {
                                                   p++;
                                                   $("[id*=ddl_subsubstage]").append($("<option></option>").val(this['substage_id']).html(this['sub_stage_desc']));
                                               });

                                           },
                                           failure: function (response) {

                                           }
                                       });


                                       find_total_time(hf_EID.value, hf_user_id.value);






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

                           }
                           else {

                               alert("Please check all compulsory fiels.")

                           }




                       });



                     <%-- $("[id*=btnSubmit_visit_details]").click(function () {



                           if (Page_ClientValidate(1)) {

                               if ($('#<%=lbl_cost_msg.ClientID%>').html() == "You have entered percentages greater than 100%.")
                               {
                                   alert("You have entered percentages greater than 100%.");
                               }
                               else
                               {
                               var percentages = $('#txt_percentages').val();

                               var subsubstage_id = $('input[id$=hf_sub_sub_stage_id]').val();
                                  // alert(subsubstage_id);
                               var Mainstage_ID = $("[id*=ddl_projectmain_stage]").val()

                               var substage_id = $("[id*=ddl_sub_stages_list]").val();
                               var project_id = $("[id*=ddl_projectclientwise]").val();
                               var client_id = $("[id*=ddl_client]").val();

                               var work_details = "";
                               var ss = $("[id*=ddl_Comple_ted]").val();

                               if (ss == "Completed") {
                                   work_details = "Completed";
                               }
                               else {
                                   work_details = $('#txt_sub_stages_progress').val();
                               }
                               var Cost_val = $('#txt_cost').val();
                               var remark = $('#txtremark').val();
                               var food_desc = $('#txt_fooddesc').val();
                               var travel_expenses = $('#txt_travel').val();
                              // alert(travel_expenses);
                               var travel_desc = $('#txt_traveldesc').val();
                               //alert(travel_desc);
                               var mtrl_txt = $('#txt_mtrl').val();
                               //alert(mtrl_txt);
                               var mtrl_desc = $('#txt_mtrldesc').val();
                              // alert(mtrl_desc);
                               var ExpensesDesc = $('#txt_fooddesc').val();
                              // alert(ExpensesDesc);
                               var ExpensesDesc = $('#txt_sub_expenses').val();
                               var _mom_Title = $('#txt_mom_Title').val();
                               var _Brief_discussion = $('#txt_Brief_discussion').val();
                               var _action = $('#txt_action').val();
                               var path = $('input[id$=hf_file_path]').val();
                               var otherExpenses = $('#txt_other').val();
                               var otherExpensesDesc = $('#txt_descother').val();
                    var ExpensesDesc = $('#txt_sub_expenses').val();


                               var start_time = String.format("{0}:{1}"
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val()
                        , $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val());

                               // alert(start_time);
                               var end_time = String.format("{0}:{1}"
                        , $('[id*=TimeSelector_end_time]').find('[id*=txtHour]').val()
                        , $('[id*=TimeSelector_end_time]').find('[id*=txtMinute]').val());
                               //  alert(end_time);


                               var dateover_or_not = $('input[id$=hf_planed_completion_date_over]').val();
                               if (dateover_or_not == "1") {
                               }
                               else {
                                   dateover_or_not = "0";
                               }
                                   
                               $.ajax({
                                   type: "post",
                                   url: "FillDetails.aspx/Add_work_details",
                                   data: "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',Mainstage_ID:'" + Mainstage_ID + "',subsubstage_id:'" + subsubstage_id + "',project_id:'" + project_id + "',client_id:'" + client_id + "',work_details:'" + work_details + "',percentages:'" + percentages + "',Cost_val:'" + Cost_val + "',ExpensesDesc:'" + ExpensesDesc + "',travel_expenses:'" + travel_expenses + "',travel_desc: '" + travel_desc + "', mtrl_txt:'" + mtrl_txt + "',mtrl_txtdesc:'" + mtrl_desc + "',empid:'" + hf_EID.value + "',_mom_Title:'" + _mom_Title + "',_Brief_discussion:'" + _Brief_discussion + "',_action:'" + _action + "',path:'" + path + "',start_time:'" + start_time + "',end_time:'" + end_time + "',dateover_or_not:'" + dateover_or_not + "',remark:'" + remark + "',otherExpenses:'" + otherExpenses + "',otherExpensesDesc:'" + otherExpensesDesc + "'}",
                                   contentType: "application/json; charset=utf-8",
                                   dataType: "json",
                                   success: function (r) {
                                       alert("Record inserted successfully");
                                       //document.location.href = "FillDetails.aspx";
                                       $("[id*=hf_sub_sub_stage_id]").val('');
                                       $("[id*=hf_planed_completion_date_over]").val('');
                                       $('#txt_percentages').val('');
                                       $('#txt_sub_stages_progress').val('');
                                       $('#txt_cost').val('');
                                       $('#txt_sub_expenses').val('');
                                       $('#txt_mom_Title').val('');
                                       $('#txt_Brief_discussion').val('');
                                       $('#txt_action').val('');
                                       // ddl_item_name
                                       //  ddl_itemlist
                                       $('#txt_quantity_expences').val('');
                                       $("#div_work_done_today").show();
                                       $("#ddl_Comple_ted option:first").attr("selected", true);
                                       $("#ddl_subsubstage option:first").attr("selected", true);

                                       var str = $('input[id$=hf_set_end_time_to_start_time]').val();
                                       var res = str.split(":");

                                       $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val(res[0]);
                                       $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val(res[1]);

                                       var plan_non_plan = 0;
                                       if ($('#rb_plan_work').is(':checked')) {
                                           plan_non_plan = 1;
                                       }
                                       else {
                                           plan_non_plan = 0;
                                       }


                                       $.ajax({
                                           type: "post",
                                           url: "FillDetails.aspx/Bind_substage_wise_sub_sub_stages_list",
                                           data: "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',plan_non_plan:'" + plan_non_plan + "'}",
                                           contentType: "application/json; charset=utf-8",
                                           dataType: "json",
                                           success: function (response) {

                                               $("[id*=ddl_subsubstage]").empty();
                                               $("<option value='-Select-'>-Select-</option>").appendTo("[id*=ddl_subsubstage]");
                                               var p = 0;
                                               $.each(response.d, function () {
                                                   p++;
                                                   $("[id*=ddl_subsubstage]").append($("<option></option>").val(this['substage_id']).html(this['sub_stage_desc']));
                                               });

                                           },
                                           failure: function (response) {

                                           }
                                       });


                                       find_total_time(hf_EID.value, hf_user_id.value);






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

                           }
                           else {

                               alert("Please check all compulsory fiels.")

                           }




                       });--%>

                      <%-- 
                       $("[id*=btnSubmit_visit_details]").click(function () {

                          
                           if (Page_ClientValidate(1)) {

                               if ($('#<%=lbl_cost_msg.ClientID%>').html() == "You have entered percentages greater than 100%.") {
                                   alert("You have entered percentages greater than 100%.");
                               }
                               else {
                                   ///alert(hf_user_id.value);
                                   //alert("test");
                                   var percentages = $('#txt_percentages').val();


                                   var subsubstage_id = $('input[id$=hf_sub_sub_stage_id]').val();

                                   var Mainstage_ID = $("[id*=ddl_projectmain_stage]").val()

                                   var substage_id = $("[id*=ddl_sub_stages_list]").val();
                                   var project_id = $("[id*=ddl_projectclientwise]").val();
                                   var client_id = $("[id*=ddl_client]").val();

                                   var work_details = "";
                                   var ss = $("[id*=ddl_Comple_ted]").val();

                                   if (ss == "Completed") {
                                       work_details = "Completed";
                                   }
                                   else {
                                       work_details = $('#txt_sub_stages_progress').val();
                                   }
                                   var txttraval = $('#txt_travel').val();
                                   var txttravaldesc = $('#txt_traveldesc').val();
                                   var txtmtrl = $('#txt_mtrl').val();
                                   var txtmtrldesc = $('#txt_mtrldesc').val();
                                   var Cost_val = $('#txt_cost').val();
                                   var ExpensesDesc = $('#txt_sub_expenses').val();
                                   var _mom_Title = $('#txt_mom_Title').val();
                                   var _Brief_discussion = $('#txt_Brief_discussion').val();
                                   var _action = $('#txt_action').val();
                                   var path = $('input[id$=hf_file_path]').val();
                                   var otherExpenses = $('#txt_other').val();
                                   var otherExpensesDesc = $('#txt_descother').val();
                                   var ExpensesDesc = $('#txt_sub_expenses').val();

                                   var start_time = String.format("{0}:{1}"
                                       , $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val()
                                       , $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val());

                                   // alert(start_time);
                                   var end_time = String.format("{0}:{1}"
                                       , $('[id*=TimeSelector_end_time]').find('[id*=txtHour]').val()
                                       , $('[id*=TimeSelector_end_time]').find('[id*=txtMinute]').val());
                                   //  alert(end_time);


                                   var dateover_or_not = $('input[id$=hf_planed_completion_date_over]').val();
                                   if (dateover_or_not == "1") {
                                   }
                                   else {
                                       dateover_or_not = "0";
                                   }

                                   alert("user_id" + hf_user_id.value);
                                   alert("substage_id" + substage_id);
                                   alert("subsubstage_id" + Mainstage_ID);
                                   alert("project_id" + project_id);
                                   alert("client_id " + client_id);
                                   alert("work_details " + work_details );
                                   alert("percentages " + percentages);
                                   alert("Cost_val " + Cost_val);
                                   alert("Cost_val " + Cost_val);
                                   alert("Cost_val " + Cost_val);
                                   alert("Cost_val " + Cost_val);
                                    alert("Cost_val " + Cost_val);
                                
                                   $.ajax({
                                   type: "POST",
                                   url: "FillDetails.aspx/Add_work_details",

                                   data: "{user_id:'" + hf_user_id.value + "' substage_id:'" + substage_id + "' Mainstage_ID:'" + Mainstage_ID + "' subsubstage_id:'" + subsubstage_id + "' project_id:'" + project_id + "' client_id '" + client_id + "' work_details '" + work_details + "' percentages '" + percentages + "' Cost_val '" + Cost_val + "' empid '" + hf_EID.value + "' _mom_Title '"' _Brief_discussion '" + _Brief_discussion + "'  start_time '" + start_time + "' end_time '" + end_time + "' dateover_or_not '" + dateover_or_not + "'}",
                                   contentType: "application/json; charset=utf-8",
                                   dataType: "json",
                                       success: function (r) {
                                        // alert("ok");
                                       alert("Record inserted successfully");
                                       //document.location.href = "FillDetails.aspx";
                                       $("[id*=hf_sub_sub_stage_id]").val('');
                                       $("[id*=hf_planed_completion_date_over]").val('');
                                       $('#txt_percentages').val('');
                                       $('#txt_sub_stages_progress').val('');
                                       $('#txt_cost').val('');
                                       $('#txt_sub_expenses').val('');
                                       $('#txt_mom_Title').val('');
                                       $('#txt_Brief_discussion').val('');
                                       $('#txt_action').val('');
                                       // ddl_item_name
                                       //  ddl_itemlist
                                       $('#txt_quantity_expences').val('');
                                       $("#div_work_done_today").show();
                                       $("#ddl_Comple_ted option:first").attr("selected", true);
                                       $("#ddl_subsubstage option:first").attr("selected", true);

                                       var str = $('input[id$=hf_set_end_time_to_start_time]').val();
                                       var res = str.split(":");

                                       $('[id*=TimeSelector_start_time]').find('[id*=txtHour]').val(res[0]);
                                       $('[id*=TimeSelector_start_time]').find('[id*=txtMinute]').val(res[1]);

                                       var plan_non_plan = 0;
                                       if ($('#rb_plan_work').is(':checked')) {
                                           plan_non_plan = 1;
                                       }
                                       else {
                                           plan_non_plan = 0;
                                       }


                                       $.ajax({
                                           type: "post",
                                           url: "FillDetails.aspx/Bind_substage_wise_sub_sub_stages_list",
                                           data: "{user_id:'" + hf_user_id.value + "',substage_id:'" + substage_id + "',plan_non_plan:'" + plan_non_plan + "'}",
                                           contentType: "application/json; charset=utf-8",
                                           dataType: "json",
                                           success: function (response) {

                                               $("[id*=ddl_subsubstage]").empty();
                                               $("<option value='-Select-'>-Select-</option>").appendTo("[id*=ddl_subsubstage]");
                                               var p = 0;
                                               $.each(response.d, function () {
                                                   p++;
                                                   $("[id*=ddl_subsubstage]").append($("<option></option>").val(this['substage_id']).html(this['sub_stage_desc']));
                                               });

                                           },
                                           failure: function (response) {

                                           }
                                       });


                                       find_total_time(hf_EID.value, hf_user_id.value);






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

                           }
                           else {

                               alert("Please check all compulsory fiels.")

                           }


                       });--%>




                       function find_total_time(empid, user_id) {

                           $.ajax({
                               type: "POST",
                               url: "FillDetails.aspx/bind_total_work_time_for_day",

                               data: "{empid:'" + empid + "',user_id:'" + user_id + "'}",
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (r) {
                                   var str = r.d;

                                   //  alert(str);

                                   $('#<%=lbl_toatl_time.ClientID%>').html(str);

                               }
                           });


                       }


                       //seema added this code for service report add 28062019
                       $("[id*=ddlcustnm]").change(function () {



                           $("#subsubstage_ddl").hide();
                           $("#div_lnk_date_change_link").hide();
                           $("#div_request_per_centages").hide();
                           var CID = $("[id*=ddlcustnm]").find("option:selected").val();
                         //  alert(CID);
                           $.ajax({
                               type: "post",
                               url: "FillDetails.aspx/Bind_custdata_list",
                               data: "{user_id:'" + hf_user_id.value + "',CID:'" + CID + "'}",
                               contentType: "application/json; charset=utf-8",
                               dataType: "json",
                               success: function (response) {
                                   var Emailid = response.d;
                                   var arr = Emailid.split(',');
                                //   alert(arr);
                                   $('#txtemail').val(arr[0]);
                                   $('#txtmobno').val(arr[1]);
                                   $('#txtaddress').val(arr[2]); 
                                   $('#txtstate').val(arr[3]); 
                                   $.each(response.d, function () {

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

                       });



                   });



                
     </script>
 
    <title></title>
</head>
    <body style="background-color: #C1C1C1;">
    <form id="form2" runat="server"  class="bs-example form-horizontal">    <%--defaultbutton="btn_submittimesheet"--%>
    <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    <Scripts>
    <asp:ScriptReference Path="~/js/webkit.js" />
    <asp:ScriptReference Path="~/js/JScript.js" />
    </Scripts>
    </cc1:ToolkitScriptManager>
    
      <asp:HiddenField ID="hf_remaining_perc" runat="server" /> 
      <asp:HiddenField ID="hf_planed_completion_date_over" runat="server" />      
      <asp:HiddenField ID="hf_user_id" runat="server" />
      <asp:HiddenField ID="hf_EID" runat="server" />
      <asp:HiddenField ID="hf_sub_sub_stage_id" runat="server" /> 
      <asp:HiddenField ID="hf_main_stage_id" runat="server" />
      <asp:HiddenField ID="hf_sub_stage_id" runat="server" />
      <asp:HiddenField ID="hf_file_path" runat="server" />
      <asp:HiddenField ID="hf_task_id" runat="server" />
      <asp:HiddenField ID="hf_set_end_time_to_start_time" runat="server" />
       
  
 <div style="background-color:White;">
       <img id="Img11" src="~/images/PMS-Header-New1.jpg" runat="server" alt="Seagull sales" style="width:100%;"/>
        </div>
         
        <div>
        <br />
        <div class="bs-docs-section">
        <div class="row">       
          <div class="col-sm-6">
                  <div class="well1">
                  <fieldset1 style="margin-top:-15px;">
                   <asp:Label ID="lblName" runat="server" Font-Names="Verdana" Font-Size="18px" 
            ForeColor="#662244"></asp:Label>
                  </fieldset1>
                  </div>
                    <div class="well">
             
                  <legend>
                  &nbsp; &nbsp;
                   <asp:Label ID="Label5" runat="server" Text="&nbsp;&nbsp;Fill Report" CssClass="Label" 
                    Height="37px" Width="100%" ForeColor="White" Font-Bold="True" 
                    Font-Size="X-Large"></asp:Label>
                  </legend>
                     
                    
          <div ID="panel2" runat="server" class="shadow_five226">
                 
                 
                    <div class="form-group">                
                    
                    
                    <div class="col-lg-10" align="center">
                    <div align="center">
                   
                   <asp:RadioButton ID="rb_plan_work" runat="server" Text="Plan" Checked="true" GroupName="101" ></asp:RadioButton>
                  &nbsp;&nbsp;&nbsp; 
                    <asp:RadioButton ID="rb_non_plan" runat="server" Text="Non Plan" GroupName="101"  ></asp:RadioButton>
                         &nbsp;&nbsp;&nbsp; 
                      <asp:RadioButton ID="rb_fill_service" runat="server" Text="Service Report" GroupName="101"  ></asp:RadioButton>
                       
                        
                        </div>
                          
                     </div>
                   </div>
                      
                     
                    <div id="project_report">     
         
                   <div class="form-group">
                   <label for="inputEmail" class="col-lg-2 control-label">Select Client Name&nbsp;<a style="color:Red;">*</a></label>
                    
                    
                    <div class="col-lg-10">
                    <asp:DropDownList ID="ddl_client" runat="server" 
                    DataTextField="CName" DataValueField="CID" CssClass="form-control1"                   
                    AppendDataBoundItems="True">
                    </asp:DropDownList>
               
   <asp:RequiredFieldValidator runat="server" ID="rfv_ddl_client" InitialValue="-Select-" ControlToValidate="ddl_client" ErrorMessage="Select Client Name" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
   <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" InitialValue="-Select-" ControlToValidate="ddl_client" ErrorMessage="Select Client Name" ValidationGroup="all" ForeColor="Red"></asp:RequiredFieldValidator>

                     </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"  CssClass="form-control1"
                           
                   AppendDataBoundItems="True" >
                </asp:DropDownList>
               <%--   AutoPostBack="True" onselectedindexchanged="ddl_projectclientwise_SelectedIndexChanged" --%>
                   <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="RequiredFieldValidator7" InitialValue="-Select-"
                    ControlToValidate="ddl_projectclientwise" ErrorMessage="Select Project Name" 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" CssClass="form-control1"
                    DataTextField="Mainstage_name" DataValueField="Mainstage_ID"                     
                    AppendDataBoundItems="True" >
                    </asp:DropDownList>
                
         
                
                                   <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator3" InitialValue="-Select-" 
                                   ControlToValidate="ddl_projectmain_stage" ErrorMessage="Select Project Main stage" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
                                   <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator8" InitialValue="-Select-"
                                    ControlToValidate="ddl_projectmain_stage" ErrorMessage="Select Project Main stage" ValidationGroup="all" ForeColor="Red"></asp:RequiredFieldValidator>

                     </div>
                   </div>
                   <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label">Stage Description&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                             <asp:DropDownList ID="ddl_sub_stages_list" runat="server" 
                    DataTextField="sub_stage_desc" DataValueField="substage_id"  CssClass="form-control1"></asp:DropDownList>
                     <%--   onselectedindexchanged="ddl_sub_stages_list_SelectedIndexChanged" AutoPostBack="True" --%>
                        <asp:Label ID="lbl_ms_g_for_add_task" runat="server" Text="" ForeColor="Red" Font-Bold="true"></asp:Label>
                     
       <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" InitialValue="-Select-" ControlToValidate="ddl_sub_stages_list"
        ErrorMessage="Select Sub Stage" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>
       <%--<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator9" ForeColor="Red" InitialValue="-Select--" ControlToValidate="ddl_sub_stages_list"
        ErrorMessage="Select Sub Stage" ValidationGroup="all"></asp:RequiredFieldValidator>
--%>
                     </div>
                   </div> 
                     <div class="form-group" id= "subsubstage_ddl" >
                    <label for="inputEmail" class="col-lg-2 control-label">Tasks Description&nbsp;</label>
                    <div class="col-lg-10">
                             <asp:DropDownList ID="ddl_subsubstage" runat="server" 
                    DataTextField="sub_sub_stage_desc" DataValueField="subsubstage_id"   CssClass="form-control1"
                   ></asp:DropDownList>
   
 
                     </div>
                   </div>
                    
                     <div class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Start Date</label>
                    <div class="col-lg-10">
                             <asp:TextBox runat="server" ID="txt_startdate" Enabled="false" Text='<%# Eval("start_date") %>' CssClass="form-control1"></asp:TextBox>                      
                     </div>
                   </div>
                   
                   
                     <div 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 runat="server" ID="txt_pdcdate" Enabled="false" 
            Text='<%# Eval("PDC_date") %>' AutoPostBack="True" ontextchanged="txt_pdcdate_TextChanged" CssClass="form-control1"></asp:TextBox>
                    
                     </div>
                   </div>
                                 
                   
                   <div id="div_Task_Completed" class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Task Completed&nbsp;</label>
                    <div class="col-lg-10">
                        <asp:DropDownList ID="ddl_Comple_ted" runat="server"  CssClass="form-control1">
                        <asp:ListItem Value="-Select-">-Select-</asp:ListItem>
                        <asp:ListItem Value="Completed">Completed</asp:ListItem>
                        </asp:DropDownList>
                  
                     </div>
                   </div>
                   
               
                   <div id="div_work_done_today" class="form-group">
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Work done today&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                      <asp:TextBox runat="server" ID="txt_sub_stages_progress" TextMode="MultiLine"  CssClass="form-control1"></asp:TextBox> 
           <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="txt_sub_stages_progress"
            ErrorMessage="Enter Work Progress Dateils " ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>

                  
                     </div>
                   </div>
                   <div id="div_Enter_Percentage" class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Enter Percentage&nbsp;<a style="color:Red;">*</a></label>
                    <div class="col-lg-2">
                    <asp:Label ID="lbl_Remaining_percentages" runat="server" Text="" Font-Bold="true" ForeColor="Red"></asp:Label> <br />
      <asp:TextBox runat="server" ID="txt_percentages"  
            CssClass="form-control1" ></asp:TextBox>       
         
              <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="Numbers" TargetControlID="txt_percentages">
                </cc1:FilteredTextBoxExtender>
                     <asp:Label runat="server" ID="lbl_cost_msg" ForeColor="Red" Text=""></asp:Label>
         
                       <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="txt_percentages"
                        ErrorMessage="Enter Percentage" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>

                     </div>
                   </div>
               <div id="div_Enterdisc" class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Problem/Feedback&nbsp; <a style="color:Red;">*</a></label>
                    <div class="col-lg-10">
                       <asp:TextBox runat="server" ID="txtremark" TextMode="MultiLine" 
            CssClass="form-control1" ></asp:TextBox>       
         
              
                     <asp:Label runat="server" ID="Label7" ForeColor="Red" Text=""></asp:Label>
         
                       <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator9" ControlToValidate="txtremark"
                        ErrorMessage="Enter Remark" ValidationGroup="1" ForeColor="Red"></asp:RequiredFieldValidator>

                     </div>
                   </div>
                   <div id="ddlvisit" class="form-group" >
                         <asp:Label runat="server" ID="lbl_note" Text="Note:- Please indicate % of the total work of this sub-stage done today.(For example, if you have completed half of this sub stage today mention 50)" ForeColor="Green"></asp:Label>

               
                   </div>
                   <div>
                     <asp:Label runat="server" ID="lbl_toatl_time" Text="" ForeColor="Green" Font-Bold="true"></asp:Label>

                   </div>
                   
                      <div class="form-group" runat="server" id="Div1">
                           
                    <label for="input_enquiry" class="col-lg-2 control-label" CssClass="form-control1">Start Time</label>
                    <div class="col-lg-10">
               
                  <tm1:TimeSelector ID="TimeSelector_start_time" runat="server" SelectedTimeFormat="TwentyFour" DisplaySeconds="false" >
                 </tm1:TimeSelector>
                   <%--  <asp:TextBox ID="TextBox1" runat="server" Width="60px"></asp:TextBox>--%>
                     </div>
                   </div>
                   
                   
                      <div class="form-group" runat="server" id="Div3">
                    <label for="input_enquiry" class="col-lg-2 control-label" CssClass="form-control1">Enter Total Minutes</label>
                    <div class="col-lg-10">
                        <asp:TextBox ID="txt_total_Minutes" runat="server" Width="60px"></asp:TextBox>
                        
                          <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Numbers" TargetControlID="txt_total_Minutes">
                </cc1:FilteredTextBoxExtender>
                
                     </div>
                   </div>
                   
                   
                   
                      <div class="form-group" runat="server" id="Div2">
                    <label for="input_enquiry" class="col-lg-2 control-label" CssClass="form-control1">End Time</label>
                    <div class="col-lg-10">
                 <tm1:TimeSelector ID="TimeSelector_end_time" runat="server" SelectedTimeFormat="TwentyFour" DisplaySeconds="false" >
                 </tm1:TimeSelector>
                     </div>
                   </div>
                   <div class="form-group" style="display:none;">                
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Attachment</label>
                    
                    <div class="col-lg-10">
                     <asp:FileUpload ID="fileupload1" runat="server" CssClass="form-control1"/>
                        <asp:Label ID="Label4" runat="server" Font-Names="Verdana" Font-Size="12px" 
                     ForeColor="#007500" 
                     Text="[Upload only Png,Jpeg,Jpg,Excel,Pdf,Word format file.]"></asp:Label>
                                               
                     </div>
                   </div>
                      <div class="form-group" runat="server" id="Div4">
                    <label for="input_enquiry" class="col-lg-2 control-label" CssClass="form-control1">Total Advance</label>
                    <div class="col-lg-10">
                        <asp:TextBox ID="TextBox1" runat="server" Width="60px"></asp:TextBox>
                        
                     </div>
                   </div>
                   
                   
                   <div class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Food Expenses&nbsp;</label>
                
                    <div class="col-lg-1">
                    <asp:TextBox ID="txt_cost" runat="server"  CssClass="form-control1" ></asp:TextBox>
     <asp:Label ID="lbl_show_cost_msg" runat="server" Text="" ForeColor="Red"></asp:Label><%--ontextchanged="txt_cost_TextChanged" AutoPostBack="true"--%>
 
  <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" FilterType="Numbers" TargetControlID="txt_cost">
                </cc1:FilteredTextBoxExtender>
                     </div> 

                   
                    <label for="input_enquiry" class="col-lg-1 control-label" CssClass="form-control1"> Description</label>
                    <div class="col-lg-3">
                
                    <asp:TextBox ID="txt_fooddesc" runat="server" TextMode="MultiLine"  CssClass="form-control1" ></asp:TextBox>
                    </div>
                 
                  </div>
                     <div class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Travel Expenses&nbsp;</label>
                
                    <div class="col-lg-1">
                    <asp:TextBox ID="txt_travel" runat="server"  CssClass="form-control1" ></asp:TextBox>
     <asp:Label ID="Label2" runat="server" Text="" ForeColor="Red"></asp:Label><%--ontextchanged="txt_cost_TextChanged" AutoPostBack="true"--%>
 
  <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Numbers" TargetControlID="txt_travel">
                </cc1:FilteredTextBoxExtender>
                     </div> 

                   
                    <label for="input_enquiry" class="col-lg-1 control-label" CssClass="form-control1"> Description</label>
                    <div class="col-lg-3">
                
                    <asp:TextBox ID="txt_traveldesc" runat="server" TextMode="MultiLine"  CssClass="form-control1" ></asp:TextBox>
                    </div>
                 
                  </div>
                <div class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Material Purchase Expenses&nbsp;</label>
                
                    <div class="col-lg-1">
                    <asp:TextBox ID="txt_mtrl" runat="server"  CssClass="form-control1" ></asp:TextBox>
     <asp:Label ID="Label3" runat="server" Text="" ForeColor="Red"></asp:Label><%--ontextchanged="txt_cost_TextChanged" AutoPostBack="true"--%>
 
  <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" FilterType="Numbers" TargetControlID="txt_mtrl">
                </cc1:FilteredTextBoxExtender>
                     </div> 

                   
                    <label for="input_enquiry" class="col-lg-1 control-label" CssClass="form-control1"> Description</label>
                    <div class="col-lg-3">
                
                    <asp:TextBox ID="txt_mtrldesc" runat="server" TextMode="MultiLine"  CssClass="form-control1" ></asp:TextBox>
                    </div>
                 
                  </div>
                         <div class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Other Expenses&nbsp;</label>
                
                    <div class="col-lg-1">
                    <asp:TextBox ID="txt_other" runat="server"  CssClass="form-control1" ></asp:TextBox>
     <asp:Label ID="Label6" runat="server" Text="" ForeColor="Red"></asp:Label><%--ontextchanged="txt_cost_TextChanged" AutoPostBack="true"--%>
 
  <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender7" runat="server" FilterType="Numbers" TargetControlID="txt_other">
                </cc1:FilteredTextBoxExtender>
                     </div> 

                   
                    <label for="input_enquiry" class="col-lg-1 control-label" CssClass="form-control1"> Description</label>
                    <div class="col-lg-3">
                
                    <asp:TextBox ID="txt_descother" runat="server" TextMode="MultiLine"  CssClass="form-control1" ></asp:TextBox>
                    </div>
                 
                  </div>
                   <div class="form-group" runat="server" id="Div_enquiry">
                    <label for="input_enquiry" class="col-lg-2 control-label" CssClass="form-control1">Total Cost</label>
                    <div class="col-lg-2">
                
                  <asp:TextBox ID="txt_sub_expenses" runat="server" CssClass="form-control1" Enabled="false"></asp:TextBox>
                    
  <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender6" runat="server" FilterType="Numbers" TargetControlID="txt_sub_expenses">
                </cc1:FilteredTextBoxExtender>
                        </div>
                   </div>
                   
                   
                     <div class="form-group">                   
             
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">MOM Title</label>
                    <div class="col-lg-10">
                        <asp:TextBox ID="txt_mom_Title" runat="server"   CssClass="form-control1" ></asp:TextBox>
                       
                     </div>
                   </div>
                   
                    <div class="form-group">                
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Brief discussion</label>
                    <div class="col-lg-10">
                        <asp:TextBox ID="txt_Brief_discussion" runat="server" TextMode="MultiLine"  CssClass="form-control1" ></asp:TextBox>
                       
                     </div>
                   </div>
                   
                    <div class="form-group">                
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Action</label>
                    <div class="col-lg-10">
                        <asp:TextBox ID="txt_action" runat="server" CssClass="form-control1"></asp:TextBox>
                                               
                     </div>
                   </div>
                   
                      <div class="form-group">                
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1"> Attachment</label>
                    
                    <div class="col-lg-10">
                     <asp:FileUpload ID="fileupload" runat="server" CssClass="form-control1"/>
                        <asp:Label ID="Label1" runat="server" Font-Names="Verdana" Font-Size="12px" 
                     ForeColor="#007500" 
                     Text="[Upload only Png,Jpeg,Jpg,Excel,Pdf,Word format file.]"></asp:Label>
                                               
                     </div>
                   </div>
                   
                    <div class="form-group">
                    <br />
                  <b style="color:Green;">Material consumption details</b><br />
                    <label for="inputEmail" class="col-lg-2 control-label" CssClass="form-control1">Item Type</label>
                    <div class="col-lg-10">
                            <asp:DropDownList runat="server" ID="ddl_item_name" AutoPostBack="true" OnSelectedIndexChanged="ddl_item_name_SelectedIndexChanged" CssClass="form-control1" > 
                       <asp:ListItem>-Select Stock Type-</asp:ListItem>
                       <asp:ListItem>Equipment Stock</asp:ListItem>     
                       <asp:ListItem>Consumable stock</asp:ListItem>
                            </asp:DropDownList>

                     </div>
                   </div>
                   
                    <div class="form-group">
                    <label for="input_classify_cust_type" class="col-lg-2 control-label" CssClass="form-control1">Item Name</label>
                    <div class="col-lg-10">
                          <asp:DropDownList runat="server" ID="ddl_itemlist" DataTextField="item_name" 
                            DataValueField="item_id" AppendDataBoundItems="true" AutoPostBack="True" CssClass="form-control1"></asp:DropDownList>  

                     </div>
                   </div>
                   
                   
                   <div class="form-group" >
                    <label for="inputEmail" class="col-lg-2 control-label" >Quantity</label>
                    <div class="col-lg-10" >
                    <asp:TextBox ID="txt_quantity_expences" runat="server" CssClass="form-control1"></asp:TextBox>                                                  
                          
                     </div>
                   </div>
</div>

             
             </div>
            <div id="div_btn">
                  <span class="help-block">
                  <asp:Label ID="lblComplete" runat="server" Font-Names="Verdana" Font-Size="12px" 
                     ForeColor="#007500" Text=""></asp:Label>
                  </span>
               <br />
                  <span class="help-block">
                    &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;  &nbsp;
          <%--     <asp:Button ID="btn_submittimesheet" runat="server"  Text="Submit"  class="btn btn-primary"
            onclick="btn_submittimesheet_Click" ValidationGroup="1" />--%>
            
             <input type="button" value="Submit" id="btnSubmit_visit_details"  class="btn btn-primary"  validationgroup="1" />
                    &nbsp;&nbsp; 
                    
                      <asp:Button ID="Button2" runat="server"  Text="Show All" 
            class="btn btn-primary" onclick="Button1_Click" ValidationGroup="123"/><%--ValidationGroup="all"--%>
               &nbsp;&nbsp; 
                  <asp:Button ID="Button1" runat="server" class="btn btn-primary"
                     Text="Close" PostBackUrl="~/html/mainpage.aspx" 
                    Width="100px"  />
                    
                 <%--   <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClientClick="return GetCurrentTime()" />--%>
                    
                     <asp:HiddenField ID="hf_value" runat="server" />
                    <b> <a style="color:Red;  padding-right:20px; float:right;">* Indicates Compulsory Fields</a></b>

                  
                    
                                  </span>
                                   <span class="help-block">
                  <asp:Label runat="server" ID="lbl_message" ForeColor="Red" Text=""></asp:Label>
                  <div id="div_lnk_date_change_link" style="width:20%; float:left;">
                     <asp:LinkButton ID="send_request_for_date_change" runat="server" 
            Text="Contact project manager" ForeColor="Blue" 
            onclick="send_request_for_date_change_Click" ></asp:LinkButton> 
            </div>
            &nbsp;&nbsp;&nbsp;
            <div id="div_request_per_centages">
              <asp:LinkButton ID="lnk_request_for_percentages" runat="server" 
            Text="Contact project manager for percentages approval"  
            ForeColor="Blue" onclick="lnk_request_for_percentages_Click" 
             ></asp:LinkButton> 
                 </div>
                  </span>
               </div>
               <div id="div_service">

                         <div class="row-fluid">
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="dateOfBirth">
                              Customer Name</label>
                              <div class="controls">
                                 <asp:DropDownList ID="ddlcustnm" runat="server"  DataTextField="CName" DataValueField="CID" CssClass="form-control1"                   
                    AppendDataBoundItems="True">
                    </asp:DropDownList>
                              
                           
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                                ControlToValidate="ddlcustnm" ErrorMessage="select Customer" ForeColor="Red"
                                InitialValue="-Select Customer-" ValidationGroup="1"></asp:RequiredFieldValidator>
                                </div>
                          </div>
                      </div>
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Complaint ID">
                              Email-Id</label>
                              <div class="controls">
                                 <asp:TextBox ID="txtemail" runat="server"
                                ReadOnly="True"></asp:TextBox>
                              </div>
                          </div>
                      </div>
                      <!--/span-->
                  </div>


 <div class="row-fluid" runat="server" id="complaintdetails">
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="dateOfBirth">
                              Complaint </label>
                              <div class="controls">
                                  <asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox>
                         
                              </div>
                          </div>
                      </div>
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="lastName">
                              Date</label>
                              <div class="controls">
                                     <asp:TextBox ID="txtdate" runat="server" 
                                Enabled="false"></asp:TextBox>
                              </div>
                          </div>
                      </div>
                  </div>

                 
                  <div class="row-fluid">
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="dateOfBirth">
                              Mobile No.</label>
                              <div class="controls">
                                 <asp:TextBox ID="txtmobno" runat="server" ></asp:TextBox>
                              </div>
                          </div>
                      </div>
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="lastName">
                              Address</label>
                              <div class="controls">
                                 <asp:TextBox ID="txtaddress" runat="server"
                                TextMode="MultiLine"></asp:TextBox>
                              </div>
                          </div>
                      </div>
                      <%-- --%>
                      <!--/span-->
                      <!--/span-->
                  </div>
                  <!--/row-->
                  <div class="row-fluid">
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Area">
                              Area</label>
                              <div class="controls">
                                  <asp:TextBox ID="txtarea" runat="server"></asp:TextBox>
                                
                              </div>
                          </div>
                      </div>
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="State">
                              State</label>
                              <div class="controls">
                                    <asp:TextBox ID="txtstate" runat="server"></asp:TextBox>
                              </div>
                          </div>
                      </div>
                      <!--/span-->
                  </div>
                   <div class="row-fluid">
                      
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Designation">
                              Designation</label>
                              <div class="controls">
                                    <asp:TextBox ID="txt_designation" runat="server"></asp:TextBox>
                              </div>
                          </div>
                      </div>
                          <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Department">
                              Department</label>
                              <div class="controls">
                                  <asp:TextBox ID="txt_department" runat="server"></asp:TextBox>
                                
                              </div>
                          </div>
                      </div>
                      <!--/span-->
                  </div>


                     <div class="row-fluid">
                   
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Timein">
                              Time In</label>
                              <div class="controls">
                                    <asp:TextBox ID="txt_timein" runat="server"></asp:TextBox>
                              </div>
                          </div>
                      </div>
                          <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Industry Type">
                              Industry Type</label>
                              <div class="controls">
                                  <asp:TextBox ID="txt_industrytype" runat="server"></asp:TextBox>
                                
                              </div>
                          </div>
                      </div>
                      <!--/span-->
                  </div>
               <div class="row-fluid">
                     
                      <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Timeout">
                              Time Out</label>
                              <div class="controls">
                                    <asp:TextBox ID="txt_timeout" runat="server"></asp:TextBox>
                              </div>
                          </div>
                      </div>
                    <div class="span6 bgcolor">
                          <div class="control-group">
                              <label class="control-label" for="Remark">Remark
                              </label>
                              <div class="controls">
                                <asp:TextBox ID="txt_remark" TextMode="MultiLine" runat="server"></asp:TextBox>
                                                                  
                              </div>
                          </div>
                      </div>
                      <!--/span-->
                     
            
                    <input type="button" value="Submit" id="btnSubmit"  class="btn btn-primary"  validationgroup="1" />
                    &nbsp;&nbsp; 
                    
                      <asp:Button ID="Button3" runat="server"  Text="Show All" Visible="false"
            class="btn btn-primary" onclick="Button1_Click" ValidationGroup="123"/><%--ValidationGroup="all"--%>
               &nbsp;&nbsp; 
                  <asp:Button ID="Button4" runat="server" class="btn btn-primary"
                     Text="Close" PostBackUrl="~/html/mainpage.aspx" 
                    Width="100px"  />
               </div>

               
                <asp:Button ID="btn_show_popup" runat="server"  style="display:none;" />
    <cc1:ModalPopupExtender runat="server" ID="popup_for_date_approval" CancelControlID="btn_close" TargetControlID="btn_show_popup" 
    PopupControlID="pnl_show_link" BehaviorID="POpUp_for_percentages_date_approval"></cc1:ModalPopupExtender>
        <asp:Panel ID="pnl_show_link" runat="server" CssClass="shadow_five2" Width="400px" BorderColor="Green" BorderWidth="2" BorderStyle="Solid">
          
         <table>
         <tr>
         <td></td>
         <td align="center"> 
         <div id="div_pop_up_req_uest_per_cent_ages">
           <asp:Label ID="lbl_msg_for_percentages" runat="server" Font-Bold="true" Text=""></asp:Label>
         <br /> <asp:LinkButton ID="lnk_per_approval" runat="server" onclick="lnk_request_for_percentages_Click"  >Contact project manager for percentages approval</asp:LinkButton>
         
            <br />
            </div>
            </td>
         </tr>
          <tr id="tr_lbl_da_te_compl_etion_msg">
         <td></td>
         <td align="center"> <asp:Label ID="lbl_date_completion_msg" runat="server" Text="" Font-Bold="true" Font-Size="11px" ></asp:Label>  
            <br /> </td>
         </tr>
          <tr id="tr_lnk_d_ate_appro_val">
         <td></td>
         <td align="center">
          <asp:LinkButton ID="lnk_date_approval" runat="server"  onclick="send_request_for_date_change_Click">Contact project manager </asp:LinkButton>
              <br /> <br /></td>
         </tr>
         <tr>
         <td></td>
         <td align="center">
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <asp:Button ID="btn_close" runat="server" Text="Close" class="btn btn-primary" />
         </td>
         </tr>
         </table>
          






        </asp:Panel>           
               
                                  
             <div ID="pnl_showgird" runat="server" class="shadow_five223" Visible="false">
                <div class="form-group">
                 
                  
             
            <div style="width:100%">
          <asp:GridView runat="server" ID="gv_dailytimesheet" AutoGenerateColumns="false" 
            AllowPaging="true" DataKeyNames="substage_id" CellSpacing="5" CellPadding="2" 
             EnableViewState="true" Font-Names="Verdana" Font-Size="12px"
            onrowcancelingedit="gv_dailytimesheet_RowCancelingEdit" 
            onrowdeleting="gv_dailytimesheet_RowDeleting" 
            onrowediting="gv_dailytimesheet_RowEditing" 
            onrowupdating="gv_dailytimesheet_RowUpdating" 
            onrowdatabound="gv_dailytimesheet_RowDataBound" 
            onpageindexchanging="gv_dailytimesheet_PageIndexChanging" Width="100%" >
          <RowStyle BackColor="#ffc9bb" ForeColor="#333333" />
        <Columns>
        <asp:TemplateField HeaderText="Sr.No" ItemStyle-Width="5%">
        <ItemTemplate>
        <center>
        <asp:Label runat="server" ID="lbl_row_id" Text='<% # Eval("Row") %>'></asp:Label>
        </center>
        </ItemTemplate>
        </asp:TemplateField>
       <asp:TemplateField HeaderText="Work Progress Details" ItemStyle-Width="50%">
       <ItemTemplate>
       <asp:Label runat="server" ID="lbl_workprogress" Text='<%# Eval("progress_desc") %>'></asp:Label>
        <asp:Label runat="server" ID="lbl_workprogress_id" Text='<%# Eval("work_progress_id") %>' Visible="false"></asp:Label>
       </ItemTemplate>
       <EditItemTemplate>
         <asp:Label runat="server" ID="lbl_workprogress_id" Text='<%# Eval("work_progress_id") %>' Visible="false"></asp:Label>
               <asp:TextBox runat="server" ID="txt_Work_progress" Text='<%# Eval("progress_desc") %>'
                BorderColor="Black" BorderWidth="1px" TextMode="MultiLine" Width="450px" Height="80px" Font-Names="Verdana" Font-Size="12px" ></asp:TextBox>

       </EditItemTemplate>
       </asp:TemplateField>
       <asp:TemplateField HeaderText="Progress Percentages" ItemStyle-Width="10%">
       <ItemTemplate>
       <asp:Label runat="server" ID="Label9" Text='<%# Eval("progress_percentages") %>'></asp:Label>
       </ItemTemplate>
       <EditItemTemplate>
        <asp:TextBox runat="server" ID="txt_progress_time" Text='<%# Eval("progress_percentages") %>' BorderColor="Black" BorderWidth="1px" Width="60px"></asp:TextBox>
       </EditItemTemplate>
       </asp:TemplateField>
       
       <asp:TemplateField HeaderText="Cost" ItemStyle-Width="5%">
        
        <ItemTemplate>
        <asp:Label runat="server" ID="lbl_cost" Text='<% # Eval("daily_expenses_cost") %>'></asp:Label>
        </ItemTemplate>
          <EditItemTemplate>
        <asp:TextBox runat="server" ID="txt_expenses_cost" Text='<%# Eval("daily_expenses_cost") %>' BorderColor="Black" BorderWidth="1px" Width="60px"></asp:TextBox>
       </EditItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Expenses Description" ItemStyle-Width="10%">
        
        <ItemTemplate>
                <asp:Label runat="server" ID="lbl_Expenses_desc" Text='<% # Eval("daily_expenses_description") %>'></asp:Label>

        </ItemTemplate>
         <EditItemTemplate>
        <asp:TextBox runat="server" ID="txt_expenses_desc" Text='<%# Eval("daily_expenses_description") %>' BorderColor="Black" BorderWidth="1px" Width="60px"></asp:TextBox>
       </EditItemTemplate>
        
        </asp:TemplateField>
       
        <asp:TemplateField HeaderText="Uploaded Date" ItemStyle-Width="10%">
        
        <ItemTemplate>
        <asp:Label runat="server" ID="Label10" Text='<%# Eval("S_DATE") %>'></asp:Label>
        
        </ItemTemplate>
        </asp:TemplateField>
         </Columns>
         <Columns>
                      <asp:TemplateField ItemStyle-Width="5%">
         <ItemTemplate>                                                                              
        <asp:LinkButton ID="lnkEdit" runat="server" CommandName="Edit" Text="Edit"></asp:LinkButton><br />
        <asp:LinkButton ID="lnkDelete" runat="server" CommandName="Delete" Text="Delete" OnClientClick="javascript : return confirm('Do you really want to \ndelete the item?');"> </asp:LinkButton>
        </ItemTemplate>
        <EditItemTemplate>
          <asp:LinkButton ID="lnkUpdate" runat="server" CausesValidation="true" CommandName="Update" Text="Update"></asp:LinkButton><br />
        <asp:LinkButton ID="lnkcancel" runat="server" CausesValidation="true" 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> 
                 
                  </div>
                 
         </div>
       </div>
            </div>  
                  </div>
                
                  
                  </div>
                  
                  </div>
          
     </div>
           
    </form>
</body>
</html>
