コード例 #1
0
 public void KHMau_LABDAO_UPDATE(KHMau_LAB OBJ)
 {
     Sql.ExecuteNonQuery("SAP", "    UPDATE [SYNC_NUTRICIEL].[dbo].[tbl_KHMau_LAB] SET " +
                         " [SoPXN]                    =   N'" + OBJ.SoPXN + "'" +
                         ",[KHMau]                    =   N'" + OBJ.KHMau + "'" +
                         //",[KHMau_GiaoMau]                    =   N'" + OBJ.KHMau_GiaoMau + "'" +
                         ",[KHMau_KhachHang]          =   N'" + OBJ.KHMau_KhachHang + "'" +
                         ",[SoLuongKHMau]             =   N'" + OBJ.SoLuongKHMau + "'" +
                         ",[SoLuongKHMauKhongDat]             =   N'" + OBJ.SoLuongKHMauKhongDat + "'" +
                         ",[LiDoKHMauKhongDat]             =   N'" + OBJ.LiDoKHMauKhongDat + "'" +
                         ",[DonViKHMau]               =   N'" + OBJ.DonViKHMau + "'" +
                         ",[PhuongPhapBaoQuan]        =   N'" + OBJ.PhuongPhapBaoQuan + "'" +
                         ",[VitriLuuKHMau]            =   N'" + OBJ.VitriLuuKHMau + "'" +
                         ",[NgayLuuKHMau]             =   CONVERT(datetime,'" + OBJ.NgayLuuKHMau + "',103)" +
                         ",[NhanVienLuuKHMau]         =   N'" + OBJ.NhanVienLuuKHMau + "'" +
                         ",[NgayHuyKHMau]             =   CONVERT(datetime,'" + OBJ.NgayHuyKHMau + "',103)" +
                         ",[TaiLieuHuyKHMau]          =   N'" + OBJ.TaiLieuHuyKHMau + "'" +
                         ",[NhanVienHuyKHMau]         =   N'" + OBJ.NhanVienHuyKHMau + "'" +
                         ",[TrangThaiKHMau]           =   N'" + OBJ.TrangThaiKHMau + "'" +
                         ",[LuuMau]           =   N'" + OBJ.LuuMau + "'" +
                         ",[HuyMau]           =   N'" + OBJ.HuyMau + "'" +
                         ",[SoLuongHuyKHMau]          =   N'" + OBJ.SoLuongHuyKHMau + "'" +
                         ",[CreatedDate]              =   CONVERT(datetime,'" + DateTime.Now + "',103)" +
                         ",[CreatedBy]                =   N'" + OBJ.CreatedBy + "' " +
                         ",[Note]                     =   N'" + OBJ.Note + "'" +
                         ",[Locked]                   =   N'" + OBJ.Locked + "'" +
                         ",[LoaiDVMauNuoc]            =   N'" + OBJ.LoaiDVMauNuoc + "'" +
                         ",[NgayLayMau]               =   CONVERT(datetime,'" + OBJ.NgayLayMau + "',103)" +
                         ",[LoaiMauGui]               =   N'" + OBJ.LoaiMauGui + "'" +
                         ",[TTMauGui]                 =   N'" + OBJ.TTMauGui + "'" +
                         ",[VTLayMauDayChuong]        =   N'" + OBJ.VTLayMauDayChuong + "'" +
                         ",[Khac]                     =   N'" + OBJ.Khac + "'" +
                         //",[BanGiaoMauStatus]                     =   N'" + true + "'" +
                         //",[NguoiNhanBanGiaoMau]                     =   N'" + OBJ.NguoiNhanBanGiaoMau + "'" +
                         //",[NguoiGiaoBanGiaoMau]                     =   N'" + OBJ.CreatedBy + "'" +
                         //",[NgayBanGiaoMau]                     =   CONVERT(datetime,'" + DateTime.Now + "',103)" +
                         ",[GioLayMauTuoi]            =   N'" + OBJ.GioLayMauTuoi + "'" +
                         " WHERE [ID]              =   " + OBJ.ID, CommandType.Text);
 }
コード例 #2
0
 public int KHMau_LABBUS_INSERT(KHMau_LAB OBJ)
 {
     return(DAO.KHMau_LABDAO_INSERT(OBJ));
 }
コード例 #3
0
        public int KHMau_LABDAO_INSERT(KHMau_LAB OBJ)
        {
            Sql.ExecuteNonQuery("SAP", "INSERT INTO [SYNC_NUTRICIEL].[dbo].[tbl_KHMau_LAB] " +
                                " ([SoPXN] " +
                                " ,[KHMau] " +
                                " ,[KHMau_GiaoMau] " +
                                " ,[KHMau_KhachHang] " +
                                " ,[SoLuongKHMau] " +
                                " ,[SoLuongKHMauKhongDat] " +
                                " ,[LiDoKHMauKhongDat] " +
                                " ,[DonViKHMau] " +
                                " ,[PhuongPhapBaoQuan] " +
                                " ,[VitriLuuKHMau] " +
                                " ,[NgayLuuKHMau] " +
                                " ,[NhanVienLuuKHMau] " +
                                " ,[NgayHuyKHMau] " +
                                " ,[TaiLieuHuyKHMau] " +
                                " ,[NhanVienHuyKHMau] " +
                                " ,[TrangThaiKHMau] " +
                                " ,[LuuMau] " +
                                " ,[HuyMau] " +
                                " ,[SoLuongHuyKHMau] " +
                                " ,[CreatedDate] " +
                                " ,[CreatedBy] " +
                                " ,[Note] " +
                                " ,[Locked] " +
                                " ,[LoaiDVMauNuoc] " +
                                " ,[NgayLayMau] " +
                                " ,[LoaiMauGui] " +
                                " ,[TTMauGui] " +
                                " ,[VTLayMauDayChuong] " +
                                " ,[Khac] " +
                                //" ,[BanGiaoMauStatus] " +
                                //" ,[NguoiNhanBanGiaoMau] " +
                                //" ,[NguoiGiaoBanGiaoMau] " +
                                //" ,[NgayBanGiaoMau] " +
                                " ,[GioLayMauTuoi] )" +
                                " VALUES " +
                                "(N'" + OBJ.SoPXN +
                                "',N'" + OBJ.KHMau +
                                "',N'" + OBJ.KHMau_GiaoMau +
                                "',N'" + OBJ.KHMau_KhachHang +
                                "',N'" + OBJ.SoLuongKHMau +
                                "',N'" + OBJ.SoLuongKHMauKhongDat +
                                "',N'" + OBJ.LiDoKHMauKhongDat +
                                "',N'" + OBJ.DonViKHMau +
                                "',N'" + OBJ.PhuongPhapBaoQuan +
                                "',N'" + OBJ.VitriLuuKHMau +
                                "',CONVERT(datetime,'" + OBJ.NgayLuuKHMau +
                                "',103),N'" + OBJ.NhanVienLuuKHMau +
                                "',CONVERT(datetime,'" + OBJ.NgayHuyKHMau +
                                "',103),N'" + OBJ.TaiLieuHuyKHMau +
                                "',N'" + OBJ.NhanVienHuyKHMau +
                                "',N'" + OBJ.TrangThaiKHMau +
                                "',N'" + OBJ.LuuMau +
                                "',N'" + OBJ.HuyMau +
                                "',N'" + OBJ.SoLuongHuyKHMau +
                                "',CONVERT(datetime,'" + DateTime.Now +
                                "',103),N'" + OBJ.CreatedBy +
                                "',N'" + OBJ.Note +
                                "','" + OBJ.Locked +
                                "',N'" + OBJ.LoaiDVMauNuoc +
                                "',CONVERT(datetime,'" + OBJ.NgayLayMau +
                                "',103),N'" + OBJ.LoaiMauGui +
                                "',N'" + OBJ.TTMauGui +
                                "',N'" + OBJ.VTLayMauDayChuong +
                                "',N'" + OBJ.Khac +
                                //"',N'" + false +
                                //"',N'" + OBJ.NguoiNhanBanGiaoMau +
                                //"',N'" + OBJ.NguoiGiaoBanGiaoMau +
                                //"',CONVERT(datetime,'" + DateTime.Now + "',103)" +
                                "',N'" + OBJ.GioLayMauTuoi +
                                "')", CommandType.Text);

            DataTable dt = Sql.ExecuteDataTable("SAP", "SELECT ID FROM [SYNC_NUTRICIEL].[dbo].[tbl_KHMau_LAB] WHERE KHMau='" + OBJ.KHMau + "'", CommandType.Text);

            return(int.Parse(dt.Rows[0]["ID"].ToString()));
        }
コード例 #4
0
 public void KHMau_LABBUS_UPDATE(KHMau_LAB OBJ)
 {
     DAO.KHMau_LABDAO_UPDATE(OBJ);
 }