public static Z01Beetle.Entity.Z01Customer GetCustomer(this Z10Order order, Zippy.Data.IDalProvider db) { Z01Beetle.Entity.Z01Customer rtn = db.FindUnique<Z01Beetle.Entity.Z01Customer>("CustomerID=@CustomerID", db.CreateParameter("CustomerID", order.CustomerID)); if (rtn == null) rtn = new Z01Beetle.Entity.Z01Customer(); return rtn; }
public void Save(Guid tenantID, Guid me) { Z01Beetle.Entity.Z01Customer cus = new Z01Beetle.Entity.Z01Customer(); cus.Title = CorpName + "[" + LinkName + "]"; cus.Tel1 = Tel; cus.TenantID = tenantID; cus.CustomerStatus = WebSiteStatus; cus.Principal = me; int cusID = Zippy.Data.StaticDB.DB.Insert(cus); if (cusID > 0) { Z01Beetle.Entity.Z01CustomerPerson cusPer = new Z01Beetle.Entity.Z01CustomerPerson(); cusPer.Name = LinkName; cusPer.Tel1 = Tel; cusPer.CustomerID = cusID; cusPer.TenantID = tenantID; cusPer.Creator = me; cusPer.UserType = BuyerPersonas; int perID = Zippy.Data.StaticDB.DB.Insert(cusPer); Z30CRM.Entity.Z30Communication com = new Z30CRM.Entity.Z30Communication(); com.VisitDate = DateTime.Now; com.VisitWay = (int)VisitWay; com.SuccessRatio = (int)SuccessRatio; com.CustomerID = cusID; com.PersonID = perID; com.Content = Content; com.TenantID = tenantID; com.Creator = me; Zippy.Data.StaticDB.DB.Insert(com); } }
public static Z01Beetle.Entity.Z01Customer GetCustomer(this Z10Order order, Zippy.Data.IDalProvider db) { Z01Beetle.Entity.Z01Customer rtn = db.FindUnique <Z01Beetle.Entity.Z01Customer>("CustomerID=@CustomerID", db.CreateParameter("CustomerID", order.CustomerID)); if (rtn == null) { rtn = new Z01Beetle.Entity.Z01Customer(); } return(rtn); }
public ActionResult SelectCustomer(int?PageIndex, int?PageSize, string qTitle, int?qCustomerType, long?orderID, string act) { int currentPageSize = PageSize ?? 8; int currentPageIndex = PageIndex ?? 1; Hashtable hs = new Hashtable(); hs.Add("qTitle", qTitle); hs.Add("qCustomerType", qCustomerType); ViewBag.qCustomerType = qCustomerType; Z01Beetle.Entity.Z01Customer cus = new Z01Beetle.Entity.Z01Customer(); ViewBag.act = act; ViewBag.orderID = orderID ?? 0; PaginatedList <Z01Beetle.Entity.Z01Customer> result = Z01Beetle.Entity.Helper.Z01CustomerHelper.Query(db, _tenant.TenantID.Value, currentPageSize, currentPageIndex, hs, 0); result.QueryParameters = hs; return(View(result)); }
public ActionResult SelectCustomer(int? PageIndex, int? PageSize, string qTitle, int? qCustomerType, long? orderID, string act) { int currentPageSize = PageSize ?? 8; int currentPageIndex = PageIndex ?? 1; Hashtable hs = new Hashtable(); hs.Add("qTitle", qTitle); hs.Add("qCustomerType", qCustomerType); ViewBag.qCustomerType = qCustomerType; Z01Beetle.Entity.Z01Customer cus = new Z01Beetle.Entity.Z01Customer(); ViewBag.act = act; ViewBag.orderID = orderID ?? 0; PaginatedList<Z01Beetle.Entity.Z01Customer> result = Z01Beetle.Entity.Helper.Z01CustomerHelper.Query(db, _tenant.TenantID.Value, currentPageSize, currentPageIndex, hs, 0); result.QueryParameters = hs; return View(result); }