Ejemplo n.º 1
0
        public static bool Update(ExcelDataSet.WorksheetsRow row)
        {
            try
            {
                WorksheetsTableAdapter adapter = new WorksheetsTableAdapter();

                adapter.Update(row);
                return(true);
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        public static bool Delete(int id)
        {
            try
            {
                ExcelDataSet.WorksheetsRow row = WorkSheet_DAL.GetDataRow(id);

                if (row == null)
                {
                    return(true);
                }

                row.Delete();
                return(WorkSheet_DAL.Update(Table));
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 3
0
        public static int Create(string name, int workbookId)
        {
            try
            {
                ExcelDataSet.WorksheetsRow row = Table.NewWorksheetsRow();

                row.Name       = name;
                row.WorkbookId = workbookId;

                Table.AddWorksheetsRow(row);

                if (!WorkSheet_DAL.Update(Table))
                {
                    return(Constants.Constants.UNDEFINED_ID);
                }

                return(row.Id);
            }
            catch
            {
                throw;
            }
        }