예제 #1
0
        public static void Insert(DBLayer.Sales.Details det)
        {
            string sql = "INSERT INTO Sales (ProductId, UserId, [Date], [Time], Quantity, IsDeleted) ";

            sql += " VALUES (" + det.ProductId.ToString() + ", " + det.UserId.ToString() + ", '" + det.Date.ToString("yyyyMMdd") + "', '" + det.Time + "', " + det.Quantity.ToString() + ", 0)";

            ZFort.DB.Execute.ExecuteString_void(sql);
        }
예제 #2
0
        public static void SetDelete(DBLayer.Sales.Details det)
        {
            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET IsDeleted = 1 WHERE [Id] = " + det.Id.ToString());

            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET DeleteDate = '" + det.DeleteDate.ToString("yyyyMMdd") + "' WHERE [Id] = " + det.Id.ToString());

            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET DeleteReason = '" + det.DeleteReason + "' WHERE [Id] = " + det.Id.ToString());
        }
예제 #3
0
        void frm3_SelectDateMsg(object sender, FitnessProject.ServiceForms.FrmCalendar.DateSelectEventArgs args)
        {
            DBLayer.Sales.Details det = DBLayer.Sales.GetDetails(this.Id);

            det.Date = args.SelectedDate;

            DBLayer.Sales.Update(det);

            LoadData();
        }
예제 #4
0
        public static void Update(DBLayer.Sales.Details det)
        {
            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET [ProductId] = " + det.ProductId.ToString() + " WHERE [Id] = " + det.Id.ToString());

            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET [Quantity] = " + det.Quantity.ToString() + " WHERE [Id] = " + det.Id.ToString());

            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET [UserId] = " + det.UserId.ToString() + " WHERE [Id] = " + det.Id.ToString());

            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET [Date] = '" + det.Date.ToString("yyyyMMdd") + "' WHERE [Id] = " + det.Id.ToString());

            ZFort.DB.Execute.ExecuteString_void("UPDATE Sales SET [Time] = '" + det.Time + "' WHERE [Id] = " + det.Id.ToString());
        }
예제 #5
0
        void frm_SelectReasonMsg(object sender, FitnessProject.ServiceForms.ReasonEventArgs args)
        {
            DBLayer.Sales.Details det = DBLayer.Sales.GetDetails(this.Id);

            det.DeleteReason = args.Reason;
            det.Quantity     = 0;
            det.DeleteDate   = DateTime.Now;

            DBLayer.Sales.SetDelete(det);
            DBLayer.Sales.Update(det);

            LoadData();
        }