| | |
| | | return objjson; |
| | | |
| | | } |
| | | catch (Exception) |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "登录异常!"; |
| | | objjson.Message = "登录异常!"+e.Message; |
| | | objjson.data = null; |
| | | return objjson; ; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取仓库列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetWarehouseList_Json_New")] |
| | | [HttpGet] |
| | | public object GetWarehouseList_Json_New(string Warehouse, Int64 HOrgID) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID =" + HOrgID + ""; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (Warehouse != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + Warehouse + "%' or HName like '%" + Warehouse + "%' or HUSEORGID like '%" + Warehouse + "%' ) "; |
| | | } |
| | | |
| | | try |
| | | { |
| | | WebS.WebService1 oWeb = new WebS.WebService1(); |
| | | ds = oWeb.GetWarehouseList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | ds = webserver.GetStockPlaceList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取仓位列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetStockPlaceList_Json_NEW")] |
| | | [HttpGet] |
| | | public object GetStockPlaceList_Json_NEW(string StockPlace, Int64 HWhID,Int64 HOrgID) |
| | | { |
| | | WebS.WebService1 oWeb = new WebS.WebService1(); |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + HOrgID + ""; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (HWhID == 0) |
| | | { |
| | | if (StockPlace != "") |
| | | { |
| | | sWhere = " Where HStopFlag=0 and ( HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%' ) "; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " Where HStopFlag=0 "; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (StockPlace != "") |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HWHID=" + HWhID.ToString() + " and HWHID=" + HWhID.ToString() + " and ( HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%' ) "; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HWHID=" + HWhID.ToString(); |
| | | } |
| | | } |
| | | try |
| | | { |
| | | //ds = webserver.GetStockPlaceList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | ds = oWeb.GetStockPlaceList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | try |
| | | { |
| | | ds = webserver.GetDepartmentList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取组织列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetOrganizationList_Json")] |
| | | [HttpGet] |
| | | public object GetOrganizationList_Json() |
| | | { |
| | | WebS.WebService1 oWebs1 = new WebS.WebService1(); |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | ////sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | //if (Organization != "") |
| | | //{ |
| | | // sWhere = sWhere + " and ( HNumber like '%" + Organization + "%' or HName like '%" + Organization + "%' ) "; |
| | | //} |
| | | try |
| | | { |
| | | ds = oWebs1.get_ORGANIZATIONSList(); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | #endregion |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// 产品入库缓存列表刷新信息 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[Route("Web/chanpinruk")] |
| | | //[HttpGet] |
| | | //public object chanpinruk(string HBillType, string sHMaker, Int64 HOrgID) |
| | | //{ |
| | | // try |
| | | // { |
| | | // ds = webserver.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID); |
| | | // if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没有返回任何记录!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | // } |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "获取信息成功!"; |
| | | // objJsonResult.data = ds.Tables[0]; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | /// <summary> |
| | | /// 产品入库缓存列表刷新信息 |
| | | /// </summary> |
| | |
| | | [HttpGet] |
| | | public object chanpinruk(string HBillType, string sHMaker, Int64 HOrgID) |
| | | { |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | try |
| | | { |
| | | ds = webserver.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID); |
| | | ds = oWebs.GetKf_PonderationBillMain_TempList_New (HBillType, sHMaker, HOrgID); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |