public int SetUpEditWinAdd(SetupFormValue form)
        {
            rpt_column rpt_column = new rpt_column();

            rpt_column.Columnname   = form.reportcolumn;
            rpt_column.Columnreport = form.report;
            rpt_column.Columnvalue  = form.reportvalue;
            _db.rpt_column.Add(rpt_column);
            return(_db.SaveChanges());
        }
        public int SetUpEditWinDelete(SetupFormValue form)
        {
            int id = -1;

            int.TryParse(form.Id, out id);
            rpt_column rpt_column = _db.rpt_column.Where(r => r.Id == id).FirstOrDefault();

            if (rpt_column != null)
            {
                _db.rpt_column.Remove(rpt_column);
                return(_db.SaveChanges());
            }
            return(0);
        }
        public int SetUpEditWinUpdate(SetupFormValue form)
        {
            int id = -1;

            int.TryParse(form.Id, out id);
            rpt_column rpt_column = _db.rpt_column.Where(rpt => rpt.Id == id).FirstOrDefault();

            if (rpt_column != null)
            {
                _db.rpt_column.Attach(rpt_column);
                rpt_column.Columnname  = form.reportcolumn;
                rpt_column.Columnvalue = form.reportvalue;
                return(_db.SaveChanges());
            }
            return(0);
        }