智云SRM-WEBAPI(目前客户通用API)
WebAPI/Controllers/WebAPIController.cs
@@ -209,7 +209,7 @@
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "登录成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.data = ds;
                    Add_Log("主界面", UserName, "登录");
                    return objJsonResult;
                }
@@ -230,7 +230,8 @@
            try
            {
                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                DS = oCn.RunProcReturn("select * from Gy_Czygl where Czybm='" + MainID + "' and Czmm='" + sPsd + "' ", "Gy_Czygl");
                //DS = oCn.RunProcReturn("select * from Gy_Czygl where Czybm='" + MainID + "' and Czmm='" + sPsd + "' ", "Gy_Czygl");
                DS = oCn.RunProcReturn("exec h_p_SRM_GetSupIDByUser '" + MainID + "','" + sPsd + "'", "h_p_SRM_GetSupIDByUser");
                if (DS.Tables[0].Rows.Count == 0)
                    return null;
                else
@@ -1004,6 +1005,54 @@
            }
        }
        /// <summary>
        /// 获取单据ID,编号
        /// </summary>
        /// <param name="sMsg"></param>
        /// <returns></returns>
        [Route("Web/GetMAXNum_New")]
        [HttpGet]
        public object GetMAXNum_New(string HBillType)
        {
            try
            {
                Int64 HInterID = 0;//显示的字段
                HInterID = CreateBillID(HBillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //----------创建虚表------------------------
                DataTable dt_Main = new DataTable("Json");
                dt_Main.Columns.Add("HInterID", typeof(int));
                //---------创建新行------------------------
                DataRow dr_main = dt_Main.NewRow();//创建新行
                dt_Main.Rows.Add(dr_main);//将新行加入到表中
                dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID);
                if (HInterID == 0)
                {
                    objjson.code = "0";
                    objjson.count = 0;
                    objjson.Message = "获取失败";
                    objjson.data = null;
                    return objjson;
                }
                else
                {
                    objjson.code = "0";
                    objjson.count = 1;
                    objjson.Message = "获取成功";
                    objjson.data = dt_Main;
                    return objjson;
                }
            }
            catch (Exception e)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败" + e.ToString();
                objjson.data = null;
                return objjson;
            }
        }
        //得到最大HINTERID
        public static Int64 CreateBillID(string BillCode, ref string sReturn)
        {