public string getWaitOrderList(string vendor, string plant_code) { Vp_purchase_orders conf = new Vp_purchase_orders(); if (!string.IsNullOrEmpty(vendor)) { conf.Vendor = vendor; Vp_users conf2 = new Vp_users(); conf2.Vendor = vendor; Vp_users valObj = BLLTable <Vp_users> .Factory("conn_gys").GetRowData(conf2); if (valObj == null) { return(""); } } else { List <string> vendors = new List <string>(); Vp_users userCond = new Vp_users(); Vp_users userVal = new Vp_users(); userVal.Vendor = ""; List <Vp_users> users = BLLTable <Vp_users> .Factory("conn_gys").Select(userVal, userCond); foreach (Vp_users u in users) { vendors.Add(u.Vendor); } conf.In(Vp_purchase_orders.Attribute.Vendor, vendors.ToArray()); } if (!string.IsNullOrEmpty(plant_code)) { conf.Plant_code = plant_code; } conf.af_WhereSQL += " AND (status='REL' OR status='VCO' OR status='CCO')"; conf.OrderBy("release_date desc"); List <Vp_purchase_orders> orderList = BLLTable <Vp_purchase_orders> .Factory("conn_gys").Select(new Vp_purchase_orders(), conf); string xml = XmlUtil.getXmlByTableList(orderList, new Vp_purchase_orders().TableName()); //string json=JsonUtil.getJsonStr<V_PURSUEDELIVER>(list); return(xml); }
protected void Page_Init(object sender, EventArgs e) { currUser = (Vp_users)Session["currUser"]; if (currUser == null) { Session["preUrl"] = Request.RawUrl; Response.Redirect("login.aspx"); } else { string preUrl=Session["preUrl"]+""; //获取当前用户的 receiverList= GYSUtil.getReceiveList(currUser.Vendor); if (!string.IsNullOrEmpty(preUrl)) { Session["preUrl"] = ""; Response.Redirect(preUrl); } } }
protected void Page_Init(object sender, EventArgs e) { currUser = (Vp_users)Session["currUser"]; if (currUser == null) { Session["preUrl"] = Request.RawUrl; Response.Redirect("login.aspx"); } else { string preUrl = Session["preUrl"] + ""; //获取当前用户的 receiverList = GYSUtil.getReceiveList(currUser.Vendor); if (!string.IsNullOrEmpty(preUrl)) { Session["preUrl"] = ""; Response.Redirect(preUrl); } } }
public string getWaitOrderList(string vendor,string plant_code) { Vp_purchase_orders conf = new Vp_purchase_orders(); if (!string.IsNullOrEmpty(vendor)) { conf.Vendor = vendor; Vp_users conf2 = new Vp_users(); conf2.Vendor = vendor; Vp_users valObj = BLLTable<Vp_users>.Factory("conn_gys").GetRowData(conf2); if (valObj == null) { return ""; } } else { List<string> vendors = new List<string>(); Vp_users userCond = new Vp_users(); Vp_users userVal = new Vp_users(); userVal.Vendor = ""; List<Vp_users> users = BLLTable<Vp_users>.Factory("conn_gys").Select(userVal, userCond); foreach (Vp_users u in users) { vendors.Add(u.Vendor); } conf.In(Vp_purchase_orders.Attribute.Vendor, vendors.ToArray()); } if (!string.IsNullOrEmpty(plant_code)) { conf.Plant_code = plant_code; } conf.af_WhereSQL += " AND (status='REL' OR status='VCO' OR status='CCO')"; conf.OrderBy("release_date desc"); List<Vp_purchase_orders> orderList = BLLTable<Vp_purchase_orders>.Factory("conn_gys").Select(new Vp_purchase_orders(), conf); string xml = XmlUtil.getXmlByTableList(orderList, new Vp_purchase_orders().TableName()); //string json=JsonUtil.getJsonStr<V_PURSUEDELIVER>(list); return xml; }