Beispiel #1
0
        public void Them_SanPham(KhoSanPham_MODEL SP)
        {
            string NGAY_DONG_GOI = string.Format("{0:MM/dd/yyyy}", SP.NGAY_DONG_GOI1);
            string NGAY_HET_HAN  = string.Format("{0:MM/dd/yyyy}", SP.NGAY_HET_HAN1);
            string sql           = "INSERT INTO KHO_SAN_PHAM VALUES('" + SP.MA_SAN_PHAM1 + "',N'" + SP.TEN_SAN_PHAM1 + "','" + SP.KHOI_LUONG_NHAP1 + "','" + SP.GIA_NHAP_VAO1 + "','" + SP.GIA_BAN_RA1 + "','" + NGAY_DONG_GOI + "','" + NGAY_HET_HAN + "',N'" + SP.NHA_CUNG_CAP1 + "',N'" + SP.NOI_XUAT_XU1 + "','" + SP.ANH1 + "')";

            K.Thao_Tac_Du_Lieu(sql);
        }
Beispiel #2
0
        public void Sua_SanPham(KhoSanPham_MODEL SP)
        {
            string NGAY_DONG_GOI = string.Format("{0:MM/dd/yyyy}", SP.NGAY_DONG_GOI1);
            string NGAY_HET_HAN  = string.Format("{0:MM/dd/yyyy}", SP.NGAY_HET_HAN1);
            string sql           = "UPDATE KHO_SAN_PHAM SET TEN_SAN_PHAM=N'" + SP.TEN_SAN_PHAM1 + "',KHOI_LUONG_NHAP='" + SP.KHOI_LUONG_NHAP1 + "',GIA_NHAP_VAO='" + SP.GIA_NHAP_VAO1 + "',GIA_BAN_RA='" + SP.GIA_BAN_RA1 + "',NGAY_DONG_GOI='" + NGAY_DONG_GOI + "',NGAY_HET_HAN='" + NGAY_HET_HAN + "',NHA_CUNG_CAP=N'" + SP.NHA_CUNG_CAP1 + "',NOI_XUAT_XU=N'" + SP.NOI_XUAT_XU1 + "',ANH='" + SP.ANH1 + "'WHERE MA_SAN_PHAM='" + SP.MA_SAN_PHAM1 + "'";

            K.Thao_Tac_Du_Lieu(sql);
        }
Beispiel #3
0
        public void Xoa_SanPham(KhoSanPham_MODEL SP)
        {
            string sql = "DELETE FROM KHO_SAN_PHAM WHERE MA_SAN_PHAM='" + SP.MA_SAN_PHAM1 + "'";

            K.Thao_Tac_Du_Lieu(sql);
        }