private void LoginForm_Load(object sender, EventArgs e) { if (ReadWriteRegistry.ReadRegistry("isInvalid") == null) { ReadWriteRegistry.WriteRegistry("isInvalid", "false"); } users = readWriteData.ReadData(); //循环添加到Combox foreach (UsersInfo userInfo in users.Values) { cbUserName.Items.Add(userInfo.UserName); } //用户名默认选中第一个 if (cbUserName.Items.Count > 0) { cbUserName.SelectedIndex = 0; txtPWD.Text = users[cbUserName.SelectedItem.ToString().Trim()].PassWord; } }
public static void SetOrderDetails() { OrderDetails = ReadWriteData.ReadData <List <OrderDetails> >("orderdetails"); }
public static void SetOrder() { Orders = ReadWriteData.ReadData <List <Order> >("Order"); }
public static void SetManager() { Managers = ReadWriteData.ReadData <List <Manager> >("manager"); }
public static void SetProductCategory() { ProductsCategories = ReadWriteData.ReadData <List <ProductsCategories> >("productCategory"); }
public static void SetCategory() { Categories = ReadWriteData.ReadData <List <Categories> >("category"); }
public static void SetProduct() { Products = ReadWriteData.ReadData <List <Product> >("product"); }