protected void LoadData()
 {
     var subcompanyinfoService = new SubcompanyinfoService();
     decimal decSubcompanyId = 0;
     if(decimal.TryParse(SubcompanyId,out decSubcompanyId))
     {
         var info = subcompanyinfoService.RetrieveSubcompanyinfoBySubcompanyid(decSubcompanyId);
         if (info != null)
         {
             litSubCompanyName.Text = info.Subcompanyname;
         }
     }
 }
 protected void ReadEntityToControl(Procurementcontract headInfo)
 {
     litPsid.Text = headInfo.Contractid;
     if (headInfo.Contractdate.HasValue)
     {
         litContactscheduledate.Text = Convert.ToDateTime(headInfo.Contractdate.Value).ToString("yyyy-MM-dd"); ;
     }
     var info = this.AssetsupplierService.RetrieveAssetsupplierBySupplierid(headInfo.Supplier);
     if (info != null)
     {
         lblSelectSupplier.Text = info.Suppliername;
     }
     var subcompanyinfoService = new SubcompanyinfoService();
     decimal decSubcompanyId = 0;
     if (decimal.TryParse(headInfo.Subcompany, out decSubcompanyId))
     {
         var infosubcompany = subcompanyinfoService.RetrieveSubcompanyinfoBySubcompanyid(decSubcompanyId);
         if (infosubcompany != null)
         {
             lblSubCompany.Text = infosubcompany.Subcompanyname;
         }
     }
     if (headInfo.Createddate.HasValue)
     {
         lblApplydate.Text = Convert.ToDateTime(headInfo.Createddate).ToString("yyyy-MM-dd");
     }
 }