Ejemplo n.º 1
0
        public static void UpdateData(int Id, string Name, string control, string icon, string active, int menuparent)
        {
            PenjaminanDatasetTableAdapters.tPageTableAdapter ta = new PenjaminanDatasetTableAdapters.tPageTableAdapter();
            PenjaminanDataset.tPageDataTable dt = ta.GetDataByID(Id);

            try
            {
                if (dt != null)
                {
                    dt[0].name       = Name;
                    dt[0].control    = control;
                    dt[0].icon       = icon;
                    dt[0].active     = active;
                    dt[0].menuparent = menuparent;
                    dt[0].creby      = "1";
                    dt[0].credate    = DateTime.Now;

                    ta.Update(dt);
                }
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message, ex);
            }
        }
Ejemplo n.º 2
0
        public static void SoftDeleteData(int id)
        {
            PenjaminanDatasetTableAdapters.tPageTableAdapter ta = new PenjaminanDatasetTableAdapters.tPageTableAdapter();
            PenjaminanDataset.tPageDataTable dt = ta.GetDataByID(id);

            try
            {
                if (dt != null)
                {
                    dt[0].deleted = "1";

                    ta.Update(dt);
                }
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message, ex);
            }
        }