chenhaozhe
8 天以前 0b2a5b242c9b518f3294d1deb13ab0a404c45340
WebAPI/Controllers/WebAPIController.cs
@@ -21067,6 +21067,50 @@
        /// <summary>
        /// 获取选单号的源单类型 通过选单号单据类型
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetHSourceBillTypeByBillType")]
        [HttpGet]
        public object GetHSourceBillTypeByBillType(string HBillType, int Num)
        {
            try
            {
                ClsCN oCn = new ClsCN();
                DataSet oDs = new DataSet();
                //有的单子源单分为红蓝单  0代表蓝单  1代表红单
                if (Num == 0)
                {           //源单为蓝单
                    oDs = oCn.RunProcReturn("select * from  Xt_BillSourceSet where HNumber='" + HBillType + "'and  HRedBlueFlag ='" + Num + "' ", "Xt_BillSourceSet");
                }
                else if (Num == 1)
                {          //源单为红单
                    oDs = oCn.RunProcReturn("select * from  Xt_BillSourceSet where HNumber='" + HBillType + "' and  HRedBlueFlag ='" + Num + "' ", "Xt_BillSourceSet");
                }
                else if (Num == 2)
                {       //不分红蓝单
                    oDs = oCn.RunProcReturn("select * from  Xt_BillSourceSet where HNumber='" + HBillType + "'", "Xt_BillSourceSet");
                }
                objjson.code = "1";
                objjson.count = 1;
                objjson.Message = "获取成功!";
                objjson.data = oDs.Tables[0];
                return objjson; ;
            }
            catch (Exception e)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败!异常" + e.ToString();
                objjson.data = null;
                return objjson; ;
            }
        }
        /// <summary>
        /// 获取选单号的源单类型
        /// </summary>
        /// <returns></returns>