コード例 #1
0
ファイル: QuanLyShop.cs プロジェクト: hamedAly/thuong-nghiep
 public void AddThoiGianHoatDongCuaShop(ThoiGianHoatDongCuaShop dm)
 {
     en.AddObject("ThoiGianHoatDongCuaShop", dm);
 }
コード例 #2
0
        public void InsertThoiGianHoatDongCuaShop(FormCollection collection, int QLSHOP_ID)
        {
            var sp = new ThoiGianHoatDongCuaShop();
            if (collection["hinhthuc"] == "tinhphi")
            {
                  var GetQL = QLGDKSRes.GetQLGiaDangKyShop(int.Parse(collection["giaca"]));
                  var TongCong = float.Parse(collection["SoNgayThangNam_"+collection["giaca"]])* GetQL.Gia;
                  sp.TongTien = TongCong;
                  sp.Gia = GetQL.Gia;
                  sp.SoNgayThangNam = float.Parse(collection["SoNgayThangNam_" + collection["giaca"]]);

            }

            IFormatProvider provider = new System.Globalization.CultureInfo("en-CA", true);
            String datetime = collection["datePicker"];
            DateTime dt = DateTime.Parse(datetime, provider, System.Globalization.DateTimeStyles.NoCurrentDateDefault);
            sp.NgayBatDau = dt;
            sp.Account_ID = 1;
            sp.QLSHOP_ID = QLSHOP_ID;
            sp.NgayTao = DateTime.Now;
            sp.TrangThai = collection["hinhthuc"];
            QLSHOPRes.AddThoiGianHoatDongCuaShop(sp);
            QLSHOPRes.Save();
        }