Пример #1
0
        public void Delete(int id)
        {
            string user = ((DBLayer.Users.Details)AppDomain.CurrentDomain.GetData("User")).FIO;

            ChargesWideDetails cDet = GetDetailsById(id);

            DBLayer.DeletingLog.DeletingLog_Details det = new DeletingLog.DeletingLog_Details();

            det.Date = DateTime.Now;
            det.Name = cDet.Name + "(" + cDet.Summ.ToString() + ")";
            det.Type = 1;
            det.User = user;

            DBLayer.DeletingLog.Insert(det);

            ZFort.DB.Execute.ExecuteString_void("DELETE FROM Charges WHERE [Id] = " + id.ToString());
        }
Пример #2
0
        public static void Delete(int id)
        {
            string user = ((DBLayer.Users.Details)AppDomain.CurrentDomain.GetData("User")).FIO;

            DBLayer.ClientsAbonements.Details det = DBLayer.ClientsAbonements.GetDetails(id);

            DBLayer.Clients.Details cDet = DBLayer.Clients.GetDetails(det.ClientId);

            DBLayer.Abonements.Details aDet = DBLayer.Abonements.GetDetails(det.AbonementId);

            DBLayer.DeletingLog.DeletingLog_Details dlDet = new DeletingLog.DeletingLog_Details();

            dlDet.Date = DateTime.Now;
            dlDet.Name = aDet.Name + "/" + cDet.FIO + "(" + aDet.Cost.ToString() + ")";
            dlDet.Type = 0;
            dlDet.User = user;

            DBLayer.DeletingLog.Insert(dlDet);

            ZFort.DB.Execute.ExecuteString_void("DELETE FROM ClientsAbonements WHERE [Id] = " + id.ToString());
        }