コード例 #1
0
        public MasjidConstruction GetById(int id)
        {
            MasjidConstruction _masjidconst_localVar = new MasjidConstruction();
            var masjidById = _tbl_MasjidConstruction.GetById(id);

            masjidById            = masjidById ?? new tbl_MasjidConstruction();
            _masjidconst_localVar = new MasjidConstruction
            {
                Id               = masjidById.Id,
                Area             = masjidById.Area,
                Head             = masjidById.Head,
                ConstructionCost = masjidById.ConstructionCost,
                Floors           = masjidById.Floors,
                AmountCollected  = masjidById.AmountCollected,
                EngineerName     = masjidById.EngineerName,
                EngineerContact  = masjidById.EngineerContact,
                PlanImg          = masjidById.PlanImg,
                // ElevationImg = masjidById.ElevationImg,
                ConstructionImg1 = masjidById.ConstructionImg1,
                Location         = masjidById.Location,
                ConstructionImg2 = masjidById.ConstructionImg2,
                ConstructionImg3 = masjidById.ConstructionImg3,
                Status           = masjidById.Status,
                UserId           = masjidById.UserId,
                Name             = (masjidById.tbl_User != null) ? masjidById.tbl_User.Name : string.Empty,
                //CommitteeId = masjidById.CommitteeId,
                //CommitteeName = (masjidById.tbl_AddMasjidCommittee != null) ? masjidById.tbl_AddMasjidCommittee.CommitteeName : string.Empty,
            };
            return(_masjidconst_localVar);
        }
コード例 #2
0
 public ActionResult Create(MasjidConstruction model)
 {
     if (model != null)
     {
         _masjidcon_Bs_Ctrller.SaveMasjidConstruction(model);
     }
     return(RedirectToAction("Index"));
 }
コード例 #3
0
        public MasjidConstruction GetMasjidConstructionDetails(MasjidConstruction model)
        {
            model = model ?? new MasjidConstruction();
            if (model.Id != 0)
            {
                model.MasjidConstructionList = MasjidConstructionList();
                model.UserList = UserList();
                model.AddMasjidCommitteeList = AddMasjidCommitteeList();
            }
            model.MasjidConstructionList = MasjidConstructionList();

            return(model);
        }
コード例 #4
0
        public void Delete(MasjidConstruction entity)
        {
            tbl_MasjidConstruction _tbl_MasjidConstruction_LocalVar = new tbl_MasjidConstruction(entity);

            using (System.Transactions.TransactionScope scope = new System.Transactions.TransactionScope())
            {
                if (entity.Id != null && entity.Id != 0)
                {
                    _tbl_MasjidConstruction_LocalVar        = _tbl_MasjidConstruction.FindBy(x => x.Id == entity.Id).FirstOrDefault();
                    _tbl_MasjidConstruction_LocalVar.Status = false;
                    _tbl_MasjidConstruction.Update(_tbl_MasjidConstruction_LocalVar);
                }
                scope.Complete();
            }
        }
コード例 #5
0
        public int SaveMasjidConstruction(MasjidConstruction model)
        {
            {
                tbl_MasjidConstruction _tbl_MasjidConstruction_LocalVar = new tbl_MasjidConstruction(model);
                if (model.Id != null && model.Id != 0)
                {
                    _tbl_MasjidConstruction_LocalVar.Status = true;
                    _tbl_MasjidConstruction.Update(_tbl_MasjidConstruction_LocalVar);
                }
                else
                {
                    _tbl_MasjidConstruction_LocalVar.CreatedDate = System.DateTime.Now;
                    _tbl_MasjidConstruction_LocalVar.CreatedBy   = 1;
                    _tbl_MasjidConstruction_LocalVar.Status      = true;
                    _tbl_MasjidConstruction_LocalVar             = _tbl_MasjidConstruction.Insert(_tbl_MasjidConstruction_LocalVar);
                }

                return(_tbl_MasjidConstruction_LocalVar.Id);
            }
        }
コード例 #6
0
 public tbl_MasjidConstruction(MasjidConstruction _obj)
 {
     Id               = _obj.Id;
     Area             = _obj.Area;
     Head             = _obj.Head;
     ConstructionCost = _obj.ConstructionCost;
     Floors           = _obj.Floors;
     AmountCollected  = _obj.AmountCollected;
     EngineerName     = _obj.EngineerName;
     EngineerContact  = _obj.EngineerContact;
     PlanImg          = _obj.PlanImg;
     //ElevationImg = _obj.ElevationImg;
     ConstructionImg1 = _obj.ConstructionImg1;
     Location         = _obj.Location;
     ConstructionImg2 = _obj.ConstructionImg2;
     ConstructionImg3 = _obj.ConstructionImg3;
     Status           = _obj.Status;
     UserId           = _obj.UserId;
     CommitteeId      = _obj.CommitteeId;
     CreatedDate      = _obj.CreatedDate;
     CreatedBy        = _obj.CreatedBy;
 }
コード例 #7
0
 public MasjidConstructionController()
 {
     _masjidcon_CoMo_Ctrller = new MasjidConstruction();
     _masjidcon_Bs_Ctrller   = new MasjidConstructionBusiness();
 }