Пример #1
0
        private void mnuShowBuilding_Click(object sender, EventArgs e)
        {
            try
            {
                if (DGrid.RowCount <= 0)
                {
                    return;
                }
                if (DGrid.CurrentRow == null)
                {
                    return;
                }
                var guid = (Guid)DGrid[dgGuid.Index, DGrid.CurrentRow.Index].Value;
                var req  = BuildingRequestBussines.Get(guid);
                if (req == null)
                {
                    return;
                }

                var     type = EnRequestType.Rahn;
                decimal fPrice1 = 0, sPrice1 = 0, fPrice2 = 0, sPrice2 = 0;

                if (req.SellPrice1 > 0)
                {
                    type = EnRequestType.Forush;
                }
                if (req.RahnPrice1 > 0)
                {
                    type = EnRequestType.Rahn;
                }

                if (type == EnRequestType.Forush)
                {
                    fPrice1 = req.SellPrice1;
                    fPrice2 = req.SellPrice2;
                }
                else
                {
                    fPrice1 = req.RahnPrice1;
                    fPrice2 = req.RahnPrice2;
                    sPrice1 = req.EjarePrice1;
                    sPrice2 = req.EjarePrice2;
                }

                var frm = new frmFilterForm(type, req.BuildingTypeGuid, req.BuildingAccountTypeGuid, req.RoomCount,
                                            req.Masahat1, req.Masahat2, fPrice1, sPrice1, fPrice2, sPrice2,
                                            req.RegionList.Select(q => q.RegionGuid).ToList());
                frm.ShowDialog(this);
            }
            catch (Exception ex)
            {
                WebErrorLog.ErrorInstence.StartErrorLog(ex);
            }
        }
Пример #2
0
 private void btnBuildingAdvanceSearch_Click(object sender, EventArgs e)
 {
     try
     {
         var frm = new frmFilterForm();
         frm.ShowDialog(this);
     }
     catch (Exception ex)
     {
         WebErrorLog.ErrorInstence.StartErrorLog(ex);
     }
 }