Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            bims2 bims2 = db.bims2.Find(id);

            db.bims2.Remove(bims2);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "id,StatementNum,StatementDate,APN,Property_Address,Property_City_State_Zip,RSO_Exemptions,SCEP_Exmpetions,IS_RSO,IS_SCEP,RSO_Invoice_Num,SCEP_Invoice_Num,Total_Units,RSO_Units_Billed,SCEP_Units_Billed,is_active,AddressMasterId")] bims2 bims2)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bims2).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bims2));
 }
        public ActionResult Index(string StreetAddress)
        {
            List <Bims2ViewModel> bvm = new List <Bims2ViewModel>();
            List <Rent2ViewModel> rvm = new List <Rent2ViewModel>();

            //var bims2return = (from bim in db.bims2
            //                  where bim.Property_Address.Contains(StreetAddress1)
            //                  select bim).Take(1);
            //var rent2return = (from rent in db.bims2
            //                  where rent.Property_Address.Contains(StreetAddress1)
            //                  select rent).Take(1);
            if (StreetAddress != null)
            {
                bims2 bims2return = db.bims2.Where(y => y.Property_Address.Contains(StreetAddress)).FirstOrDefault();
                rent2 rent2return = db.rent2.Where(y => y.Property_Address.Contains(StreetAddress)).FirstOrDefault();
                if (bims2return != null)
                {
                    bvm.Add(new Bims2ViewModel {
                        RSO_Units_Billed = bims2return.RSO_Units_Billed, Total_Units = bims2return.Total_Units, SCEP_Invoice_Num = bims2return.SCEP_Invoice_Num, RSO_Invoice_Num = bims2return.RSO_Invoice_Num, IS_SCEP = bims2return.IS_SCEP, IS_RSO = bims2return.IS_RSO, StatementNum = bims2return.StatementNum, APN = bims2return.APN, StatementDate = bims2return.StatementDate, Property_Address = bims2return.Property_Address, Property_City_State_Zip = bims2return.Property_City_State_Zip, RSO_Exemptions = bims2return.RSO_Exemptions, SCEP_Exmpetions = bims2return.SCEP_Exmpetions
                    });
                }
                if (rent2return != null)
                {
                    rvm.Add(new Rent2ViewModel {
                        Category = rent2return.Category, Year_Built = rent2return.Year_Built, RSO_Units = rent2return.RSO_Units, Exempted_Units = rent2return.Exempted_Units, Council_District = rent2return.Council_District, APN = rent2return.APN, Property_Address = rent2return.Property_Address, Service_Date = rent2return.Service_Date, Land_Use_Code = rent2return.Land_Use_Code, Unit_Count = rent2return.Unit_Count
                    });
                }
                ModelTotal finalItem = new ModelTotal();
                finalItem.Bims2List = bvm;
                finalItem.Rent2List = rvm;

                return(View(finalItem));
            }
            else
            {
                StreetAddress = "8325 DUCOR AVE";
                bims2 bims2return = db.bims2.Where(y => y.Property_Address.Contains(StreetAddress)).First();
                rent2 rent2return = db.rent2.Where(y => y.Property_Address.Contains(StreetAddress)).First();
                bvm.Add(new Bims2ViewModel {
                    RSO_Units_Billed = bims2return.RSO_Units_Billed, Total_Units = bims2return.Total_Units, SCEP_Invoice_Num = bims2return.SCEP_Invoice_Num, RSO_Invoice_Num = bims2return.RSO_Invoice_Num, IS_SCEP = bims2return.IS_SCEP, IS_RSO = bims2return.IS_RSO, StatementNum = bims2return.StatementNum, APN = bims2return.APN, StatementDate = bims2return.StatementDate, Property_Address = bims2return.Property_Address, Property_City_State_Zip = bims2return.Property_City_State_Zip, RSO_Exemptions = bims2return.RSO_Exemptions, SCEP_Exmpetions = bims2return.SCEP_Exmpetions
                });
                rvm.Add(new Rent2ViewModel {
                    Category = rent2return.Category, Year_Built = rent2return.Year_Built, RSO_Units = rent2return.RSO_Units, Exempted_Units = rent2return.Exempted_Units, Council_District = rent2return.Council_District, APN = rent2return.APN, Property_Address = rent2return.Property_Address, Service_Date = rent2return.Service_Date, Land_Use_Code = rent2return.Land_Use_Code, Unit_Count = rent2return.Unit_Count
                });
                ModelTotal finalItem = new ModelTotal();
                finalItem.Bims2List = bvm;
                finalItem.Rent2List = rvm;
                return(View(finalItem));
            }
        }
Exemple #4
0
        // GET: bims2/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            bims2 bims2 = db.bims2.Find(id);

            if (bims2 == null)
            {
                return(HttpNotFound());
            }
            return(View(bims2));
        }