예제 #1
0
        public void Delete(AddMadarsaCommittee entity)
        {
            tbl_AddMadarsaCommittee AddMadarsaCommitteeData = new tbl_AddMadarsaCommittee(entity);

            using (System.Transactions.TransactionScope scope = new System.Transactions.TransactionScope())
            {
                if (entity.Id != null && entity.Id != 0)
                {
                    AddMadarsaCommitteeData.Id     = entity.Id;
                    AddMadarsaCommitteeData.Status = false;
                    _tbl_AddMadarsaCommittee.Update(AddMadarsaCommitteeData);
                }
                scope.Complete();
            }
        }
예제 #2
0
        public int SaveMadarsaCommittee(AddMadarsaCommittee model)
        {
            tbl_AddMadarsaCommittee _AddMadarsaCommittee = new tbl_AddMadarsaCommittee(model);

            if (model.Id != null && model.Id != 0)
            {
                _AddMadarsaCommittee.Status = true;
                _tbl_AddMadarsaCommittee.Update(_AddMadarsaCommittee);
            }
            else
            {
                _AddMadarsaCommittee.CreatedBy   = 1;
                _AddMadarsaCommittee.CreatedDate = System.DateTime.Now;
                _AddMadarsaCommittee.Status      = true;
                _tbl_AddMadarsaCommittee.Insert(_AddMadarsaCommittee);
            }

            return(_AddMadarsaCommittee.Id);
        }