Пример #1
0
 public static System.Data.Objects.ObjectResult<BAOCAOLICHSUTONKHO> GetLichSuTonKho(KaraokeEntities kara, int KhoID, DateTime dtFrom, DateTime dtTo)
 {
     var Parameter_KhoID = new System.Data.SqlClient.SqlParameter("@KhoID", System.Data.SqlDbType.Int);
     Parameter_KhoID.Value = KhoID;
     var Parameter_DateFrom = new System.Data.SqlClient.SqlParameter("@DateFrom", System.Data.SqlDbType.DateTime);
     Parameter_DateFrom.Value = dtFrom;
     var Parameter_DateTo = new System.Data.SqlClient.SqlParameter("@DateTo", System.Data.SqlDbType.DateTime);
     Parameter_DateTo.Value = dtTo;
     return kara.ExecuteStoreQuery<BAOCAOLICHSUTONKHO>("SP_BAOCAOLICHSUTONKHO @KhoID, @DateFrom, @DateTo", Parameter_KhoID, Parameter_DateFrom, Parameter_DateTo);
 }
Пример #2
0
        public static System.Data.Objects.ObjectResult <BAOCAOLICHSUTONKHO> GetLichSuTonKho(KaraokeEntities kara, int KhoID, DateTime dtFrom, DateTime dtTo)
        {
            var Parameter_KhoID = new System.Data.SqlClient.SqlParameter("@KhoID", System.Data.SqlDbType.Int);

            Parameter_KhoID.Value = KhoID;
            var Parameter_DateFrom = new System.Data.SqlClient.SqlParameter("@DateFrom", System.Data.SqlDbType.DateTime);

            Parameter_DateFrom.Value = dtFrom;
            var Parameter_DateTo = new System.Data.SqlClient.SqlParameter("@DateTo", System.Data.SqlDbType.DateTime);

            Parameter_DateTo.Value = dtTo;
            return(kara.ExecuteStoreQuery <BAOCAOLICHSUTONKHO>("SP_BAOCAOLICHSUTONKHO @KhoID, @DateFrom, @DateTo", Parameter_KhoID, Parameter_DateFrom, Parameter_DateTo));
        }
Пример #3
0
 public static NHANVIEN CheckLogin(KaraokeEntities kara, string user, string pass)
 {
     if (!String.IsNullOrEmpty(user) && !String.IsNullOrEmpty(pass))
     {
         var Parameter_TenDangNhap = new System.Data.SqlClient.SqlParameter("@TenDangNhap", System.Data.SqlDbType.VarChar, 50);
         Parameter_TenDangNhap.Value = user;
         var Parameter_MatKhau = new System.Data.SqlClient.SqlParameter("@MatKhau", System.Data.SqlDbType.VarChar, 255);
         Parameter_MatKhau.Value = pass;
         NHANVIEN nv = kara.ExecuteStoreQuery <NHANVIEN>("SP_Login_NhanVien @TenDangNhap, @MatKhau", Parameter_TenDangNhap, Parameter_MatKhau).FirstOrDefault();
         return(nv);
     }
     return(null);
 }
Пример #4
0
 public static NHANVIEN CheckLogin(KaraokeEntities kara,string user, string pass)
 {
     if (!String.IsNullOrEmpty(user) && !String.IsNullOrEmpty(pass))
     {
         var Parameter_TenDangNhap = new System.Data.SqlClient.SqlParameter("@TenDangNhap", System.Data.SqlDbType.VarChar, 50);
         Parameter_TenDangNhap.Value = user;
         var Parameter_MatKhau = new System.Data.SqlClient.SqlParameter("@MatKhau", System.Data.SqlDbType.VarChar, 255);
         Parameter_MatKhau.Value = pass;
         NHANVIEN nv = kara.ExecuteStoreQuery<NHANVIEN>("SP_Login_NhanVien @TenDangNhap, @MatKhau", Parameter_TenDangNhap, Parameter_MatKhau).FirstOrDefault();
         return nv;
     }
     return null;
 }
Пример #5
0
 public static IQueryable<BAOCAONGAYTONG> GetBaoCaoNgayTong(KaraokeEntities kara,DateTime dtFrom, DateTime dtTo)
 {
     //return from x in kara.BAOCAONGAYTONGs
     //       where dtFrom.CompareTo(x.NgayBan.Value) <= 0 && dtTo.CompareTo(x.NgayBan.Value) >= 0
     //       select x;
     
     var paraFrom = new System.Data.SqlClient.SqlParameter("@NgayBatDau", System.Data.SqlDbType.DateTime);
     paraFrom.Value = dtFrom;
     var paraTo = new System.Data.SqlClient.SqlParameter("@NgayKetThuc", System.Data.SqlDbType.DateTime);
     paraTo.Value = dtTo;
     var sql = kara.ExecuteStoreQuery<BAOCAONGAYTONG>("SP_REPORT_BAOCAONGAYTONG @NgayBatDau,@NgayKetThuc", paraFrom, paraTo);
     return sql.AsQueryable<BAOCAONGAYTONG>();
 }
Пример #6
0
        public IQueryable <BAOCAONHANVIEN> GetBaoCaoNhanVien(DateTime dtFrom, DateTime dtTo)
        {
            //return from x in mKaraokeEntities.BAOCAONHANVIENs
            //       where dtFrom.CompareTo(x.NgayBan.Value) <= 0 && dtTo.CompareTo(x.NgayBan.Value) >= 0
            //       orderby x.TenNhanVien
            //       select x;
            var paraFrom = new System.Data.SqlClient.SqlParameter("@NgayBatDau", System.Data.SqlDbType.DateTime);

            paraFrom.Value = dtFrom;
            var paraTo = new System.Data.SqlClient.SqlParameter("@NgayKetThuc", System.Data.SqlDbType.DateTime);

            paraTo.Value = dtTo;
            var sql = mKaraokeEntities.ExecuteStoreQuery <BAOCAONHANVIEN>("SP_REPORT_BAOCAONHANVIEN @NgayBatDau,@NgayKetThuc", paraFrom, paraTo);

            return(sql.AsQueryable <BAOCAONHANVIEN>());
        }
Пример #7
0
        public static IQueryable <BAOCAONGAYTONG> GetBaoCaoNgayTong(KaraokeEntities kara, DateTime dtFrom, DateTime dtTo)
        {
            //return from x in kara.BAOCAONGAYTONGs
            //       where dtFrom.CompareTo(x.NgayBan.Value) <= 0 && dtTo.CompareTo(x.NgayBan.Value) >= 0
            //       select x;

            var paraFrom = new System.Data.SqlClient.SqlParameter("@NgayBatDau", System.Data.SqlDbType.DateTime);

            paraFrom.Value = dtFrom;
            var paraTo = new System.Data.SqlClient.SqlParameter("@NgayKetThuc", System.Data.SqlDbType.DateTime);

            paraTo.Value = dtTo;
            var sql = kara.ExecuteStoreQuery <BAOCAONGAYTONG>("SP_REPORT_BAOCAONGAYTONG @NgayBatDau,@NgayKetThuc", paraFrom, paraTo);

            return(sql.AsQueryable <BAOCAONGAYTONG>());
        }