예제 #1
0
 public static bool UpdateSite(Site site)
 {
     Boolean flag = false;
     try
     {
         Icontext objinter = new BALSite();
         flag = objinter.UpdateRecord(site);
     }
     catch (Exception ex)
     {
         throw;
     }
     return flag;
 }
예제 #2
0
        public Object EditRecord(Int64 siteID)
        {
            Site _site = new Site();
            try
            {
                SiteMaster site = DAL.DALSite.EditSite(siteID);
                _site.Id = site.Id;

                if (site.ClientID != null)
                {
                    _site.ClientID = site.ClientID;
                }

                if (site.SiteName != null)
                {
                    _site.SiteName = site.SiteName.Trim();
                }
                if ((site.SiteName != null))
                {
                    _site.SiteRef = site.SiteRef;
                }
                if (site.BillingFrequency != null)
                {
                    _site.BillingFrequency = site.BillingFrequency;
                }
                if (site.BillingUpto != null)
                {
                    _site.BillingUpto = Common.DateGBString(site.BillingUpto.ToString());
                }
                if (site.BillingDate != null)
                {
                    _site.BillingDate = Common.DateGBString(site.BillingDate.ToString());
                }
                if (site.FixedBillNotice != null)
                {
                    _site.FixedBillNotice =Convert.ToBoolean(site.FixedBillNotice);
                }
                if (site.FixedBillNote != null)
                {
                    _site.FixedBillNote = site.FixedBillNote;
                }
                if (site.BankName != null)
                {
                    _site.BankName = site.BankName;
                }
                if (site.BankSortCode != null)
                {
                    _site.BankSortCode = site.BankSortCode;
                }
                if (site.BankAccount != null)
                {
                    _site.BankAccount = site.BankAccount;
                }
                if (site.OINSUNNumber != null)
                {
                    _site.OINSUNNumber = site.OINSUNNumber;
                }
                if (site.ManualReviewofBill != null)
                {
                    _site.ManualReviewofBill = site.ManualReviewofBill;
                }
                if (site.ContactName != null)
                {
                    _site.ContactName = site.ContactName;
                }
                if (site.DepartmentID != null)
                {
                    _site.DepartmentID = site.DepartmentID;
                }
                if (site.Telephone != null)
                {
                    _site.Telephone = site.Telephone;
                }
                if (site.Mobile != null)
                {
                    _site.Mobile = site.Mobile;
                }
                if (site.Email != null)
                {
                    _site.Email = site.Email;
                }
                if (site.DomesticProperties != null)
                {
                    _site.DomesticProperties = site.DomesticProperties;
                }
                if (site.CommercialProperties != null)
                {
                    _site.CommercialProperties = site.CommercialProperties;
                }
                if (site.BulkSupplies != null)
                {
                    _site.BulkSupplies = site.BulkSupplies;
                }

                if (site.CreditControl != null)
                {
                    _site.CreditControl = site.CreditControl;
                }
                if (site.EndDate != null)
                {
                    _site.EndDate = Common.DateGBString(site.EndDate.ToString());
                }

                if (site.ClientRefNo != null)
                {
                    _site.ClientRefNo = site.ClientRefNo.Trim();
                }

            }
            catch (Exception ex)
            {
                throw;
            }
            return _site;
        }
예제 #3
0
 public static Boolean CreateSite(Site site)
 {
     Boolean flag = false;
     try
     {
         Icontext objtext = new BALSite();
         flag = objtext.CreateRecord(site);
     }
     catch (Exception ex)
     {
         throw;
     }
     return flag;
 }