Ejemplo n.º 1
0
        public int DeletePanelGroup(int key)
        {
            TblPanelGroupMaster panelgroup = dbContext.TblPanelGroupMaster.Where(x => x.PanelGroupId == key).FirstOrDefault();

            panelgroup.IsActive = false;
            dbContext.TblPanelGroupMaster.Update(panelgroup);
            return(dbContext.SaveChanges());
        }
Ejemplo n.º 2
0
        public int UpdatePanelGroup(TblPanelGroupMaster tblPanelGroup)
        {
            if (dbContext.TblPanelGroupMaster.Where(r => r.PanelGroupName.ToUpper() == tblPanelGroup.PanelGroupName.ToUpper() && r.PanelGroupId != tblPanelGroup.PanelGroupId && r.IsActive == true).Count() > 0)
            {
                return(-1);
            }
            tblPanelGroup.IsActive = true;
            dbContext.Entry(tblPanelGroup).State = EntityState.Modified;
            dbContext.TblPanelGroupMaster.Update(tblPanelGroup);
            int result = dbContext.SaveChanges();

            dbContext.Entry(tblPanelGroup).State = EntityState.Detached;
            return(result);
        }
Ejemplo n.º 3
0
 public int UpdatePanelGroup(TblPanelGroupMaster tblPanelGroup)
 {
     return(MastersDAL.UpdatePanelGroup(tblPanelGroup));
 }
Ejemplo n.º 4
0
 public int CreatePanelGroup(TblPanelGroupMaster tblPanelGroup)
 {
     return(MastersDAL.CreatePanelGroup(tblPanelGroup));
 }
Ejemplo n.º 5
0
        public IActionResult PanelGroup(int id, [FromBody] TblPanelGroupMaster tblPanelGroup)
        {
            int result = _imasters.UpdatePanelGroup(tblPanelGroup);

            return(Ok(result));
        }
Ejemplo n.º 6
0
        public IActionResult PanelGroup(int id)
        {
            TblPanelGroupMaster result = _imasters.GetPanelGroupByCriteria(id);

            return(Ok(result));
        }