Beispiel #1
0
        public MdlOrgType EditOrgType(int id)
        {
            ORGTYPE    item  = _dbFirms.ORGTYPEs.Where(x => x.OrgTypeID == id).SingleOrDefault();
            MdlOrgType model = new MdlOrgType();

            model.OrgTypeID   = item.OrgTypeID;
            model.OrgTypeName = item.OrgTypeName;
            model.IsActive    = item.IsActive;
            return(model);
        }
 public ActionResult Create()
 {
     if (sig != null)
     {
         MdlOrgType model = new MdlOrgType();
         return(View(model));
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
 public ActionResult Edit(MdlOrgType obj)
 {
     if (sig != null)
     {
         obj.EnteredByUser_ID = sig.UserID;
         MngOrgTypeobj.UpdateOrgType(obj);
         return(RedirectToAction("Index"));
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
        public ActionResult Edit(int id)
        {
            if (sig != null)
            {
                MdlOrgType model = new MdlOrgType();

                model = MngOrgTypeobj.EditOrgType(id);
                return(View(model));
            }
            else
            {
                return(RedirectToAction("Index", "Login"));
            }
        }
 public ActionResult Create(MdlOrgType obj)
 {
     if (sig != null)
     {
         //MdlOrgType model = new MdlOrgType();
         // MngOrgType bznsorgtype = new MngOrgType();
         obj.EnteredByUser_ID = sig.UserID;
         MngOrgTypeobj.AddNewOrgType(obj);
         return(RedirectToAction("Index"));
     }
     else
     {
         return(RedirectToAction("Index", "Login"));
     }
 }
Beispiel #6
0
 public void UpdateOrgType(MdlOrgType obj)
 {
     _dbFirms.usp_UpdateOrgType(obj.OrgTypeID, obj.OrgTypeName, obj.EnteredByUser_ID.Value);
 }
Beispiel #7
0
 public void AddNewOrgType(MdlOrgType obj)
 {
     _dbFirms.usp_InsertNewOrgType(obj.OrgTypeName, obj.EnteredByUser_ID.Value);
 }