//======================================== //RecordCostumer() save the information of the //costumer who is purchasing items //======================================== public void recordCustomer(int id) { saleLineItems = new List <SaleLine>(); purchaser = c_Info.Search(id); count.OrderCounter = count.OrderCounter + 1; }
/// <summary> /// 新增客户表,和地址表 /// </summary> /// <param name="c"></param> /// <param name="d"></param> /// <returns></returns> public static int Get_kehuinsert(customer c) { return(KLdal.Get_kehuinsert(c)); }
/// <summary> /// 修改 /// </summary> /// <param name="c"></param> /// <param name="d"></param> /// <returns></returns> public static int Get_kehuUpdate(customer c) { return(KLdal.Get_kehuUpdate(c)); }
//======================================= //Update existing costumer //======================================= public void updateCustomer(customer obj) { customer.updateCostumer(data); }
//======================================= //Add new costumer to file //======================================= public void addCustomer(customer obj) { obj.Payables = 0; data.Add(obj); customer.addCostumer(obj); }
/// <summary> /// 修改 /// </summary> /// <param name="cu"></param> /// <returns></returns> public int updatecustomer(customer cu) { return(new customerDAL().updatecustomer(cu)); }
public customer query(customer cu) { string sql = " and ID=" + cu.ID; return(new customerDAL().selcustomer(sql)[0]); }
/// <summary> /// 登录 /// </summary> /// <param name="cu"></param> /// <returns></returns> public customer selcustomer(customer cu) { string sql = " and Account = '" + cu.Account + "' and [password] = '" + cu.Pssword + "'"; return(new customerDAL().selcustomer(sql)[0]); }