/// <summary> /// Deprecated Method for adding a new object to the tbNHANVIENs EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTotbNHANVIENs(tbNHANVIEN tbNHANVIEN) { base.AddObject("tbNHANVIENs", tbNHANVIEN); }
public static void InsertNewStaff(string Manhanvien, string Maphongkham, string Manhomnhanvien, string Hoten, string Gioitinh, string Tendangnhap, string Matkhau, string Chucdanh, bool Tinhtrang, DateTime Ngaytao) { using (DB_HMS_Entities staff = new DB_HMS_Entities()) { tbNHANVIEN infor = new tbNHANVIEN(); infor.MANHANVIEN = Manhanvien; infor.MAPHONGKHAM = Maphongkham; infor.MANHOMND = Manhomnhanvien; infor.HOTEN = Hoten; infor.GIOITINH = Gioitinh; infor.CHUCDANH = Chucdanh; infor.IDDANGNHAP = Tendangnhap; infor.MATKHAU = ToMD5(ToMD5(ToMD5(Matkhau))); infor.TRANGTHAI = Tinhtrang; infor.NGAYTAO = Ngaytao; staff.AddTotbNHANVIENs(infor); staff.SaveChanges(); } }
/// <summary> /// Create a new tbNHANVIEN object. /// </summary> /// <param name="mANHANVIEN">Initial value of the MANHANVIEN property.</param> /// <param name="mAPHONGKHAM">Initial value of the MAPHONGKHAM property.</param> /// <param name="mANHOMND">Initial value of the MANHOMND property.</param> /// <param name="iDDANGNHAP">Initial value of the IDDANGNHAP property.</param> /// <param name="mATKHAU">Initial value of the MATKHAU property.</param> public static tbNHANVIEN CreatetbNHANVIEN(global::System.String mANHANVIEN, global::System.String mAPHONGKHAM, global::System.String mANHOMND, global::System.String iDDANGNHAP, global::System.String mATKHAU) { tbNHANVIEN tbNHANVIEN = new tbNHANVIEN(); tbNHANVIEN.MANHANVIEN = mANHANVIEN; tbNHANVIEN.MAPHONGKHAM = mAPHONGKHAM; tbNHANVIEN.MANHOMND = mANHOMND; tbNHANVIEN.IDDANGNHAP = iDDANGNHAP; tbNHANVIEN.MATKHAU = mATKHAU; return tbNHANVIEN; }