public string Title()
        {
            try
            {
                var type       = "";
                var regionName = "";

                if (bu.RahnPrice1 > 0 || bu.RahnPrice2 > 0)
                {
                    type = "رهن و اجاره";
                }
                else if (bu.SellPrice > 0)
                {
                    type = "فروش";
                }

                if (bu.RegionGuid != Guid.Empty)
                {
                    regionName = RegionsBussines.Get(bu.RegionGuid)?.Name ?? "";
                }

                return($"{type} ملک در {regionName}");
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
                return("");
            }
        }
Esempio n. 2
0
 public frmRegionMain(Guid guid, bool isShowMode)
 {
     InitializeComponent();
     cls                 = RegionsBussines.Get(guid);
     ucHeader.Text       = !isShowMode ? $"ویرایش منطقه {cls.Name}" : $"مشاهده منطقه {cls.Name}";
     ucHeader.IsModified = cls.IsModified;
     grp.Enabled         = !isShowMode;
     btnFinish.Enabled   = !isShowMode;
 }
Esempio n. 3
0
        private static string Text(BuildingBussines bu)
        {
            var res = "";

            try
            {
                res = Settings.Classes.Payamak.OwnerText;

                if (res.Contains(Replacor.Owner.Code))
                {
                    res = res.Replace(Replacor.Owner.Code, bu.Code);
                }
                if (res.Contains(Replacor.Owner.DateSabt))
                {
                    res = res.Replace(Replacor.Owner.DateSabt, bu.DateSh);
                }
                if (res.Contains(Replacor.Owner.OwnerName))
                {
                    var owner = PeoplesBussines.Get(bu.OwnerGuid);
                    res = res.Replace(Replacor.Owner.OwnerName, owner?.Name);
                }
                if (res.Contains(Replacor.Owner.Region))
                {
                    var reg = RegionsBussines.Get(bu.RegionGuid);
                    res = res.Replace(Replacor.Owner.Region, reg?.Name);
                }
                if (res.Contains(Replacor.Owner.UserName))
                {
                    var user = UserBussines.Get(bu.UserGuid);
                    res = res.Replace(Replacor.Owner.UserName, user?.Name);
                }
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }

            return(res);
        }
        public string Content()
        {
            try
            {
                var content = new StringBuilder();
                var reg     = "";
                if (bu.RegionGuid != Guid.Empty)
                {
                    reg = RegionsBussines.Get(bu.RegionGuid)?.Name ?? "";
                }

                content.AppendLine($"محدوده: {reg}");
                content.AppendLine($"متراژ: {bu.Masahat}");
                content.AppendLine($"سال ساخت: {bu.SaleSakht}");

                return(content.ToString());
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
                return("");
            }
        }