public tbl_NewMadarsaOperations(NewMadarsaOperation _obj)
 {
     Id               = _obj.Id;
     HeadMasterName   = _obj.HeadMasterName;
     Head             = _obj.Head;
     ExpectedStudents = _obj.ExpectedStudents;
     Boys             = _obj.Boys;
     Girls            = _obj.Girls;
     Teachers         = _obj.Teachers;
     Residential      = _obj.Residential;
     MonthlyCost      = _obj.MonthlyCost;
     PerStudentCost   = _obj.PerStudentCost;
     SourceofRevenue  = _obj.SourceofRevenue;
     Location         = _obj.Location;
     Address          = _obj.Address;
     OwnRented        = _obj.OwnRented;
     TotalLandArea    = _obj.TotalLandArea;
     ConstructedArea  = _obj.ConstructedArea;
     ChargingStudent  = _obj.ChargingStudent;
     Howmuch          = _obj.Howmuch;
     Picture1         = _obj.Picture1;
     Picture2         = _obj.Picture2;
     Picture3         = _obj.Picture3;
     Picture4         = _obj.Picture4;
     Status           = _obj.Status;
     UserId           = _obj.UserId;
     CommitteeId      = Convert.ToInt32(_obj.CommitteeId);
 }
Exemple #2
0
 public ActionResult Details(int id)
 {
     if (id != null && id != 0)
     {
         _EMO_CoMo_Ctrller = _EMO_Bs_Ctrller.GetById(id);
     }
     return(View(_EMO_CoMo_Ctrller));
 }
Exemple #3
0
 public ActionResult Create(NewMadarsaOperation model)
 {
     if (model != null)
     {
         _EMO_Bs_Ctrller.Save(model);
     }
     return(RedirectToAction("Index"));
 }
        public NewMadarsaOperation GetDetails(NewMadarsaOperation model)
        {
            model = model ?? new NewMadarsaOperation();
            if (model.Id != 0)
            {
                model.AddMadarsaCommitteeList = AddMadarsaCommitteeList();
                model.NewMadarsaOperationList = NewMadarsaOperationList();
                model.UserList1 = UserList();
            }
            model.NewMadarsaOperationList = NewMadarsaOperationList();

            return(model);
        }
Exemple #5
0
 public ActionResult Details(int id, string Comment, bool Status)
 {
     if (id != null)
     {
         _EMO_CoMo_Ctrller = _EMO_Bs_Ctrller.GetById(id);
         Approval _Approval = new Approval();
         _Approval.RequestId   = _EMO_CoMo_Ctrller.Id;
         _Approval.RequestType = _EMO_CoMo_Ctrller.RequestId;
         _Approval.Comment     = Comment;
         _Approval.Status      = Status;
         _ApprovalBusiness.InsertApproval(_Approval);
     }
     return(RedirectToAction("Index", "Approval"));
 }
        public void Delete(NewMadarsaOperation entity)
        {
            tbl_NewMadarsaOperations _tbl_EMO_LocalVar = new tbl_NewMadarsaOperations(entity);

            using (System.Transactions.TransactionScope scope = new System.Transactions.TransactionScope())
            {
                if (entity.Id != null && entity.Id != 0)
                {
                    _tbl_EMO_LocalVar.Id     = entity.Id;
                    _tbl_EMO_LocalVar.Status = false;
                    _tbl_NewMadarsaOperations.Update(_tbl_EMO_LocalVar);
                }
                scope.Complete();
            }
        }
Exemple #7
0
 public ActionResult Create(int?id)
 {
     if (id != null)
     {
         _EMO_CoMo_Ctrller = _EMO_Bs_Ctrller.GetById(Convert.ToInt32(id));
         _EMO_CoMo_Ctrller.AddMadarsaCommitteeList = _EMO_Bs_Ctrller.AddMadarsaCommitteeList().ToList();
         _EMO_CoMo_Ctrller.UserList1 = _EMO_Bs_Ctrller.UserList().ToList();
         return(View(_EMO_CoMo_Ctrller));
     }
     else
     {
         _EMO_CoMo_Ctrller.NewMadarsaOperationList = _EMO_Bs_Ctrller.NewMadarsaOperationList().ToList();
         _EMO_CoMo_Ctrller.AddMadarsaCommitteeList = _EMO_Bs_Ctrller.AddMadarsaCommitteeList().ToList();
         _EMO_CoMo_Ctrller.UserList1 = _EMO_Bs_Ctrller.UserList().ToList();
         return(View(_EMO_CoMo_Ctrller));
     }
 }
        public int Save(NewMadarsaOperation model)
        {
            tbl_NewMadarsaOperations _tbl_EMO_LocalVar = new tbl_NewMadarsaOperations(model);

            if (model.Id != null && model.Id != 0)
            {
                _tbl_EMO_LocalVar.Status = true;
                _tbl_NewMadarsaOperations.Update(_tbl_EMO_LocalVar);
            }
            else
            {
                _tbl_EMO_LocalVar.CreateDate = System.DateTime.Now;
                _tbl_EMO_LocalVar.CreatedBy  = 1;
                _tbl_EMO_LocalVar.Status     = true;
                _tbl_EMO_LocalVar            = _tbl_NewMadarsaOperations.Insert(_tbl_EMO_LocalVar);
            }

            return(_tbl_EMO_LocalVar.Id);
        }
        public NewMadarsaOperation GetById(int id)
        {
            NewMadarsaOperation _NewMadOp_LV = new NewMadarsaOperation();
            var item = _tbl_NewMadarsaOperations.GetById(id);

            item         = item ?? new tbl_NewMadarsaOperations();
            _NewMadOp_LV = new NewMadarsaOperation
            {
                Id               = item.Id,
                HeadMasterName   = item.HeadMasterName,
                Head             = item.Head,
                ExpectedStudents = item.ExpectedStudents,
                Boys             = item.Boys,
                Girls            = item.Girls,
                Teachers         = item.Teachers,
                Residential      = item.Residential,
                MonthlyCost      = item.MonthlyCost,
                PerStudentCost   = item.PerStudentCost,
                SourceofRevenue  = item.SourceofRevenue,
                Location         = item.Location,
                Address          = item.Address,
                OwnRented        = item.OwnRented,
                TotalLandArea    = item.TotalLandArea,
                ConstructedArea  = item.ConstructedArea,
                ChargingStudent  = item.ChargingStudent,
                Howmuch          = item.Howmuch,
                Picture1         = item.Picture1,
                Picture2         = item.Picture2,
                Picture3         = item.Picture3,
                Picture4         = item.Picture4,
                Status           = item.Status,
                UserId           = item.UserId,
                Name             = (item.tbl_User != null) ? item.tbl_User.Name : string.Empty,
                CommitteeId      = item.CommitteeId,
                CommitteeName    = (item.tbl_AddMadarsaCommittee != null) ? item.tbl_AddMadarsaCommittee.CommitteeName : string.Empty,
            };
            return(_NewMadOp_LV);
        }
Exemple #10
0
 public NewMadarsaController()
 {
     _EMO_CoMo_Ctrller = new NewMadarsaOperation();
     _EMO_Bs_Ctrller   = new NewMadarsaOperationBusiness();
     _ApprovalBusiness = new ApprovalBusiness();
 }