| New file |
| | |
| | | using Model; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.DAL |
| | | { |
| | | public class DataBaseServices : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | /// <summary> |
| | | /// æ°å¢éè´§å |
| | | /// </summary> |
| | | /// <param name="GroupName">ç级åç§°</param> |
| | | /// <param name="isModify">æ¯å¦ä¿®æ¹ç¶æ</param> |
| | | /// <returns></returns> |
| | | public int SavePOInStockBill(string POInStock) |
| | | { |
| | | return 0; |
| | | //string sql = ""; |
| | | //string sReturn = ""; |
| | | //JObject job = JObject.Parse(POInStock); |
| | | //try |
| | | //{ |
| | | // //å¾å°mainid |
| | | // Int64 HInterID = DBUtility.ClsPub.CreateBillID("1103", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // //è¥MAINDIéå¤åéæ°è·å |
| | | // oCn.BeginTran(); |
| | | // //主表 |
| | | // oCn.RunProc("Insert Into Cg_POInStockBillMain " + |
| | | // "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | // ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | // ",HAddress,HSupID,HCurID,HWHID,HExRate" + |
| | | // ",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo" + |
| | | // ") " + |
| | | // " values('1103','11251'," + HInterID.ToString() + ",'" + job["åæ®å·"].ToString() + "','" + job["æ¥æ"].ToString() + "'" + |
| | | // ",'2019',12,'" + job["è¡¨å¤´å¤æ³¨"].ToString() + "','admin',getdate()" + |
| | | // ",'null'," + job["hsubid"].ToString() + "," + job["hcurid"].ToString() + ",'null','null'"+ |
| | | // ", " + job["HEmpID"].ToString() + "," + job["hmanagerid"].ToString() + "," + job["HDeptID"].ToString() + ",'null','null'" + |
| | | // ") "); |
| | | // //æå
¥å表 |
| | | // foreach (Model.ClsCg_POInStockBill oSub in ) |
| | | // { |
| | | // oCn.RunProc("Insert into Cg_POInStockBillSub " + |
| | | // " (HInterID,HEntryID,HRemark,HDate" + |
| | | // ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | // ",HMaterID,HUnitID,HQty,HPrice,HMoney,HWHID" + |
| | | // ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HCheckQty,HPassQty,HBadQty" + |
| | | // ") values(" |
| | | // + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "','" +oSub.HDate + |
| | | // "'," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | // "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + |
| | | // "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HCheckQty.ToString() +","+oSub.HPassQty.ToString() +"," +oSub.HBadQty.ToString() + |
| | | // ") "); |
| | | // } |
| | | // oCn.Commit(); |
| | | // return 1; |
| | | //} |
| | | //catch (Exception e) |
| | | //{ |
| | | // sReturn = e.Message; |
| | | // oCn.RollBack(); |
| | | // throw (e); |
| | | //} |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Script.Serialization; |
| | | using Newtonsoft.Json.Linq; |
| | | using Model; |
| | | using DBUtility; |
| | | |
| | | namespace DAL |
| | | { |
| | | |
| | | public class POInStockBillServices |
| | | { |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | /// <summary> |
| | | /// è¦è´§éç¥å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public DataSet GetPOInStockBill() |
| | | { |
| | | try |
| | | { |
| | | DataSet dataSet = oCn.RunProcReturn("select * from h_v_Cg_POInStockBillList ", "ClsCg_POInStockBill"); //where hmaterid=" + sqlWhere |
| | | return dataSet; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | throw; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// éè´è®¢åå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public DataSet GetPOOrderBill() |
| | | { |
| | | try |
| | | { |
| | | DataSet dataSet = oCn.RunProcReturn("select * from h_v_Cg_POOrderBillList ", "h_v_Cg_POOrderBillList"); //where hmaterid=" + sqlWhere |
| | | return dataSet; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | throw; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å§å¤è®¢åå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public DataSet GetICSubContractBill() |
| | | { |
| | | try |
| | | { |
| | | DataSet dataSet = oCn.RunProcReturn("select * from h_v_Kf_EntrustInBillList ", "h_v_Kf_EntrustInBillList"); //where hmaterid=" + sqlWhere |
| | | return dataSet; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | throw; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ¡ç æ¡£æ¡å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public DataSet GetBarCodeBill() |
| | | { |
| | | try |
| | | { |
| | | DataSet dataSet = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill ", "h_v_Gy_BarCodeBill"); //where hmaterid=" + sqlWhere |
| | | return dataSet; |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | throw; |
| | | } |
| | | } |
| | | public List<ClsCg_POInStockBill> GetLabelPrintDetail(long sqlWhere) |
| | | { |
| | | List<ClsCg_POInStockBill> POInStockBillList = new List<ClsCg_POInStockBill>(); |
| | | try |
| | | { |
| | | SqlParameter[] param = new SqlParameter[] |
| | | { |
| | | //new SqlParameter("@sqlWhere", sqlWhere) |
| | | //new SqlParameter("@JDInterID",""), |
| | | //new SqlParameter("@JDEntryID","") |
| | | }; |
| | | SqlDataReader reader = SQLHelpers.GetReaderByProcedure("ClsCg_POInStockBill", param); |
| | | |
| | | while (reader.Read()) |
| | | { |
| | | POInStockBillList.Add(new ClsCg_POInStockBill() |
| | | { |
| | | HInterID = DBUtility.ClsPub.isLong(reader["HInterID"]), |
| | | HEntryID = DBUtility.ClsPub.isLong(reader["HEntryID"]), |
| | | |
| | | HDateForWeb = DBUtility.ClsPub.isStrNull(reader["HDateForWeb"]), |
| | | HAddress = DBUtility.ClsPub.isStrNull(reader["HAddress"]),// varchar(200) --交货å°ç¹ |
| | | HSupID = DBUtility.ClsPub.isLong(reader["HSupID"]),// int --ä¾åºå ï¼Gy_Supplierï¼ |
| | | HCurID = DBUtility.ClsPub.isLong(reader["HCurID"]),// int --å¸å« (Gy_Currency) |
| | | HWHID = DBUtility.ClsPub.isLong(reader["HWHID"]),// int --ä»åº |
| | | HExRate = DBUtility.ClsPub.isLong(reader["HExRate"]),// money --æ±ç (éæ©å®å¸å«å¸¦åº) |
| | | HEmpID = DBUtility.ClsPub.isLong(reader["HEmpID"]),// int --ä¸å¡å (Gy_Employee) |
| | | HMangerID = DBUtility.ClsPub.isLong(reader["HMangerID"]),// int --主管 (Gy_Employee) |
| | | HDeptID = DBUtility.ClsPub.isLong(reader["HDeptID"]),// int --é¨é¨ (Gy_Employee) |
| | | HExplanation = DBUtility.ClsPub.isStrNull(reader["HExplanation"]),// varchar(200) --æè¦ |
| | | HInnerBillNo = DBUtility.ClsPub.isStrNull(reader["HInnerBillNo"]),// varchar(50) --å
é¨åæ®å· |
| | | HMaterID = DBUtility.ClsPub.isLong(reader["HMaterID"]),// int --ç©æID (Gy_Material) |
| | | HUnitID = DBUtility.ClsPub.isLong(reader["HUnitID"]),// int --计éåä½ (Gy_Unit) |
| | | HQty = DBUtility.ClsPub.isLong(reader["HQty"]),// dec(18,8) --è¦è´§æ°é |
| | | HCheckQty = DBUtility.ClsPub.isLong(reader["HCheckQty"]), //æ£éªæ° |
| | | HPassQty = DBUtility.ClsPub.isLong(reader["HPassQty"]), //åæ ¼æ° |
| | | HBadQty = DBUtility.ClsPub.isLong(reader["HBadQty"]), //ä¸åæ ¼æ° |
| | | HPrice = DBUtility.ClsPub.isLong(reader["HPrice"]),// dec(18,8) --åå¸åä»· |
| | | HMoney = DBUtility.ClsPub.isLong(reader["HMoney"]),// dec(18,8) --åå¸éé¢ |
| | | // HWHID// --æ¶æä»åº |
| | | HPOOrderInterID = DBUtility.ClsPub.isLong(reader["HPOOrderInterID"]),// |
| | | HPOOrderEntryID = DBUtility.ClsPub.isLong(reader["HPOOrderEntryID"]),// |
| | | HPOOrderBillNo = DBUtility.ClsPub.isStrNull(reader["HPOOrderBillNo"]),// |
| | | HDate = DBUtility.ClsPub.isDate(reader["HDate"]), //è¦è´§æ¶é´ |
| | | HState = DBUtility.ClsPub.isLong(reader["HState"]), |
| | | HBackDate = DBUtility.ClsPub.isStrNull(reader["HBackDate"]), |
| | | HBacker = DBUtility.ClsPub.isStrNull(reader["HBacker"]), |
| | | HBillerID = DBUtility.ClsPub.isLong(reader["HBillerID"]), |
| | | HBillNo = DBUtility.ClsPub.isStrNull(reader["HBillNo"]), |
| | | HBillStatus = DBUtility.ClsPub.isInt(reader["HBillStatus"]), |
| | | HBillSubType = DBUtility.ClsPub.isStrNull(reader["HBillSubType"]), |
| | | HBillType = DBUtility.ClsPub.isStrNull(reader["HBillType"]), |
| | | HCheckDate = DBUtility.ClsPub.isStrNull(reader["HCheckDate"]), |
| | | HChecker = DBUtility.ClsPub.isStrNull(reader["HChecker"]), |
| | | HCheckFlowID = DBUtility.ClsPub.isLong(reader["HCheckFlowID"]), |
| | | HCheckItemNextID = DBUtility.ClsPub.isLong(reader["HCheckItemNextID"]), |
| | | HCheckItemNowID = DBUtility.ClsPub.isLong(reader["HCheckItemNowID"]), |
| | | HCloseDate = DBUtility.ClsPub.isStrNull(reader["HCloseDate"]), |
| | | // HCloseMan= DBUtility.ClsPub.isLong(reader["HEntryID"]), |
| | | HCloseType = DBUtility.ClsPub.isBool(reader["HCloseType"]), |
| | | //HDate= DBUtility.ClsPub.isLong(reader["HEntryID"]), |
| | | HDeleteDate = DBUtility.ClsPub.isStrNull(reader["HDeleteDate"]), |
| | | HDeleteMan = DBUtility.ClsPub.isStrNull(reader["HDeleteMan"]), |
| | | HEmpCode = DBUtility.ClsPub.isStrNull(reader["HEmpCode"]), |
| | | HMainSourceBillNo = DBUtility.ClsPub.isStrNull(reader["HMainSourceBillNo"]), |
| | | HMainSourceBillType = DBUtility.ClsPub.isStrNull(reader["HMainSourceBillType"]), |
| | | HMainSourceEntryID = DBUtility.ClsPub.isLong(reader["HMainSourceEntryID"]), |
| | | HMainSourceInterID = DBUtility.ClsPub.isLong(reader["HMainSourceInterID"]), |
| | | HMakeDate = DBUtility.ClsPub.isStrNull(reader["HMakeDate"]), |
| | | HMaker = DBUtility.ClsPub.isStrNull(reader["HMaker"]), |
| | | HPeriod = DBUtility.ClsPub.isLong(reader["HPeriod"]), |
| | | HRemark = DBUtility.ClsPub.isStrNull(reader["HRemark"]), |
| | | HUpDateDate = DBUtility.ClsPub.isStrNull(reader["HUpDateDate"]), |
| | | HUpDater = DBUtility.ClsPub.isStrNull(reader["HUpDater"]), |
| | | HYear = DBUtility.ClsPub.isLong(reader["HYear"]), |
| | | // HCloseMan= DBUtility.ClsPub.isLong(reader["HEntryID"]), |
| | | // HCloseType= DBUtility.ClsPub.isLong(reader["HEntryID"]), |
| | | HEntryCloseDate = DBUtility.ClsPub.isDate(reader["HEntryCloseDate"]), |
| | | HRelationMoney = DBUtility.ClsPub.isLong(reader["HRelationMoney"]), |
| | | HRelationQty = DBUtility.ClsPub.isLong(reader["HRelationQty"]), |
| | | // HRemark= DBUtility.ClsPub.isStrNull(reader["HEntryID"]), |
| | | HSourceBillNo = DBUtility.ClsPub.isStrNull(reader["HSourceBillNo"]), |
| | | HSourceBillType = DBUtility.ClsPub.isStrNull(reader["HSourceBillType"]), |
| | | HSourceEntryID = DBUtility.ClsPub.isLong(reader["HSourceEntryID"]), |
| | | HSourceInterID = DBUtility.ClsPub.isLong(reader["HSourceInterID"]), |
| | | }); |
| | | } |
| | | reader.Close(); |
| | | return POInStockBillList; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.IO; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | |
| | | namespace DAL |
| | | { |
| | | public class SQLHelpers |
| | | { |
| | | |
| | | /***è¿æ¥æ°æ®åº****/ |
| | | public static string connectionString = "User ID=HX_User;Password=lc@841022;Data Source=.;Initial Catalog=HX_APSsys_WDR"; |
| | | // PublicFunc publicFunc = new PublicFunc(); |
| | | #region æ§è¡ç®åSQLè¯å¥ |
| | | public static SqlDataReader GetReader(string sql) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(sql, conn); |
| | | try |
| | | { |
| | | conn.Open(); |
| | | SqlDataReader objReader = |
| | | cmd.ExecuteReader(CommandBehavior.CloseConnection); |
| | | return objReader; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | conn.Close(); |
| | | throw ex; |
| | | } |
| | | } |
| | | public static SqlDataReader GetReader(string sql, SqlParameter[] param) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(sql, conn); |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.Parameters.AddRange(param); |
| | | SqlDataReader objReader = |
| | | cmd.ExecuteReader(CommandBehavior.CloseConnection); |
| | | return objReader; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | conn.Close(); |
| | | throw ex; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ§è¡SQLè¯å¥ï¼è¿åå½±åçè®°å½æ° |
| | | /// </summary> |
| | | /// <param name="SQLString">SQLè¯å¥</param> |
| | | /// <returns>å½±åçè®°å½æ°</returns> |
| | | public static int ExecuteSql(string SQLString) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | using (SqlCommand cmd = new SqlCommand(SQLString, connection)) |
| | | { |
| | | try |
| | | { |
| | | connection.Open(); |
| | | int rows = cmd.ExecuteNonQuery(); |
| | | return rows; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | |
| | | connection.Close(); |
| | | throw e; |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ¥è¯¢åä¸ç»æ |
| | | /// </summary> |
| | | /// <param name="sql"></param> |
| | | /// <returns></returns> |
| | | public static object GetSingleResult(string sql) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(sql, conn); |
| | | try |
| | | { |
| | | conn.Open(); |
| | | return cmd.ExecuteScalar(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | public static object GetSingleResult(string sql, SqlParameter[] param) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand comm = new SqlCommand(sql, conn); |
| | | try |
| | | { |
| | | conn.Open(); |
| | | comm.Parameters.AddRange(param); |
| | | return comm.ExecuteScalar(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteLog(ex.Message); |
| | | throw new Exception("å¨è°ç¨public static object GetSingleResult(string sql,SqlParameter[] param)æ¹æ³æ¶åºéï¼é误信æ¯" + ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ§è¡å¤ç»ææ¥è¯¢ï¼selectï¼ |
| | | /// </summary> |
| | | /// <param name="sql"></param> |
| | | /// <returns></returns> |
| | | |
| | | public static int ExecuteSqlByTime(string SQLString, int Times) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | using (SqlCommand cmd = new SqlCommand(SQLString, connection)) |
| | | { |
| | | try |
| | | { |
| | | connection.Open(); |
| | | cmd.CommandTimeout = Times; |
| | | int rows = cmd.ExecuteNonQuery(); |
| | | return rows; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | |
| | | |
| | | connection.Close(); |
| | | throw e; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public static int ExecuteSqlTran(List<String> SQLStringList) |
| | | { |
| | | using (SqlConnection conn = new SqlConnection(connectionString)) |
| | | { |
| | | conn.Open(); |
| | | SqlCommand cmd = new SqlCommand(); |
| | | cmd.Connection = conn; |
| | | SqlTransaction tx = conn.BeginTransaction(); |
| | | cmd.Transaction = tx; |
| | | try |
| | | { |
| | | int count = 0; |
| | | for (int n = 0; n < SQLStringList.Count; n++) |
| | | { |
| | | string strsql = SQLStringList[n]; |
| | | if (strsql.Trim().Length > 1) |
| | | { |
| | | cmd.CommandText = strsql; |
| | | count += cmd.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | tx.Commit(); |
| | | return count; |
| | | } |
| | | catch |
| | | { |
| | | |
| | | tx.Rollback(); |
| | | return 0; |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ§è¡å¸¦ä¸ä¸ªåå¨è¿ç¨åæ°ççSQLè¯å¥ã |
| | | /// </summary> |
| | | /// <param name="SQLString">SQLè¯å¥</param> |
| | | /// <param name="content">åæ°å
容,æ¯å¦ä¸ä¸ªåæ®µæ¯æ ¼å¼å¤æçæç« ï¼æç¹æ®ç¬¦å·ï¼å¯ä»¥éè¿è¿ä¸ªæ¹å¼æ·»å </param> |
| | | /// <returns>å½±åçè®°å½æ°</returns> |
| | | public static int ExecuteSql(string SQLString, string content) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | SqlCommand cmd = new SqlCommand(SQLString, connection); |
| | | System.Data.SqlClient.SqlParameter myParameter = new System.Data.SqlClient.SqlParameter("@content", SqlDbType.NText); |
| | | myParameter.Value = content; |
| | | cmd.Parameters.Add(myParameter); |
| | | try |
| | | { |
| | | connection.Open(); |
| | | int rows = cmd.ExecuteNonQuery(); |
| | | return rows; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | |
| | | throw e; |
| | | } |
| | | finally |
| | | { |
| | | |
| | | cmd.Dispose(); |
| | | connection.Close(); |
| | | } |
| | | } |
| | | } |
| | | #region æ§è¡å¸¦åæ°çSQLè¯å¥ |
| | | |
| | | /// <summary> |
| | | /// æ§è¡SQLè¯å¥ï¼è¿åå½±åçè®°å½æ° |
| | | /// </summary> |
| | | /// <param name="SQLString">SQLè¯å¥</param> |
| | | /// <returns>å½±åçè®°å½æ°</returns> |
| | | public static int ExecuteSql(string SQLString, params SqlParameter[] cmdParms) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | using (SqlCommand cmd = new SqlCommand()) |
| | | { |
| | | try |
| | | { |
| | | PrepareCommand(cmd, connection, null, SQLString, cmdParms); |
| | | int rows = cmd.ExecuteNonQuery(); |
| | | cmd.Parameters.Clear(); |
| | | return rows; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | // WriteLog(e.Message); |
| | | throw e; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | private static void PrepareCommand(SqlCommand cmd, SqlConnection conn, SqlTransaction trans, string cmdText, SqlParameter[] cmdParms) |
| | | { |
| | | if (conn.State != ConnectionState.Open) |
| | | conn.Open(); |
| | | cmd.Connection = conn; |
| | | cmd.CommandText = cmdText; |
| | | if (trans != null) |
| | | cmd.Transaction = trans; |
| | | cmd.CommandType = CommandType.Text;//cmdType; |
| | | if (cmdParms != null) |
| | | { |
| | | |
| | | |
| | | foreach (SqlParameter parameter in cmdParms) |
| | | { |
| | | if ((parameter.Direction == ParameterDirection.InputOutput || parameter.Direction == ParameterDirection.Input) && |
| | | (parameter.Value == null)) |
| | | { |
| | | parameter.Value = DBNull.Value; |
| | | } |
| | | cmd.Parameters.Add(parameter); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ§è¡å¸¦ä¸ä¸ªåå¨è¿ç¨åæ°ççSQLè¯å¥ã |
| | | /// </summary> |
| | | /// <param name="SQLString">SQLè¯å¥</param> |
| | | /// <param name="content">åæ°å
容,æ¯å¦ä¸ä¸ªåæ®µæ¯æ ¼å¼å¤æçæç« ï¼æç¹æ®ç¬¦å·ï¼å¯ä»¥éè¿è¿ä¸ªæ¹å¼æ·»å </param> |
| | | /// <returns>å½±åçè®°å½æ°</returns> |
| | | public static object ExecuteSqlGet(string SQLString, string content) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | SqlCommand cmd = new SqlCommand(SQLString, connection); |
| | | System.Data.SqlClient.SqlParameter myParameter = new System.Data.SqlClient.SqlParameter("@content", SqlDbType.VarChar); |
| | | myParameter.Value = content; |
| | | cmd.Parameters.Add(myParameter); |
| | | try |
| | | { |
| | | connection.Open(); |
| | | object obj = cmd.ExecuteScalar(); |
| | | if ((Object.Equals(obj, null)) || (Object.Equals(obj, System.DBNull.Value))) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return obj; |
| | | } |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | |
| | | throw e; |
| | | } |
| | | finally |
| | | { |
| | | cmd.Dispose(); |
| | | connection.Close(); |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åæ°æ®åºéæå
¥å¾åæ ¼å¼çåæ®µ(åä¸é¢æ
åµç±»ä¼¼çå¦ä¸ç§å®ä¾) |
| | | /// </summary> |
| | | /// <param name="strSQL">SQLè¯å¥</param> |
| | | /// <param name="fs">å¾ååè,æ°æ®åºçåæ®µç±»å为imageçæ
åµ</param> |
| | | /// <returns>å½±åçè®°å½æ°</returns> |
| | | /// <summary> |
| | | /// æ§è¡æ¥è¯¢è¯å¥ï¼è¿åSqlDataReader ( 注æï¼è°ç¨è¯¥æ¹æ³åï¼ä¸å®è¦å¯¹SqlDataReaderè¿è¡Close ) |
| | | /// </summary> |
| | | /// <param name="strSQL">æ¥è¯¢è¯å¥</param> |
| | | /// <returns>SqlDataReader</returns> |
| | | public static SqlDataReader ExecuteReader(string strSQL) |
| | | { |
| | | SqlConnection connection = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(strSQL, connection); |
| | | try |
| | | { |
| | | connection.Open(); |
| | | SqlDataReader myReader = cmd.ExecuteReader(CommandBehavior.CloseConnection); |
| | | |
| | | return myReader; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | |
| | | throw e; |
| | | } |
| | | |
| | | } |
| | | public static int ExecuteSqlInsertImg(string strSQL, byte[] fs) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | SqlCommand cmd = new SqlCommand(strSQL, connection); |
| | | System.Data.SqlClient.SqlParameter myParameter = new System.Data.SqlClient.SqlParameter("@fs", SqlDbType.Image); |
| | | myParameter.Value = fs; |
| | | cmd.Parameters.Add(myParameter); |
| | | try |
| | | { |
| | | connection.Open(); |
| | | int rows = cmd.ExecuteNonQuery(); |
| | | return rows; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | |
| | | throw e; |
| | | } |
| | | finally |
| | | { |
| | | cmd.Dispose(); |
| | | connection.Close(); |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// æ§è¡æ¥è¯¢è¯å¥ï¼è¿åDataSet |
| | | /// </summary> |
| | | /// <param name="SQLString">æ¥è¯¢è¯å¥</param> |
| | | /// <returns>DataSet</returns> |
| | | public static DataSet Query(string SQLString) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | DataSet ds = new DataSet(); |
| | | try |
| | | { |
| | | connection.Open(); |
| | | SqlDataAdapter command = new SqlDataAdapter(SQLString, connection); |
| | | command.Fill(ds, "ds"); |
| | | } |
| | | catch (System.Data.SqlClient.SqlException ex) |
| | | { |
| | | |
| | | throw new Exception(ex.Message); |
| | | } |
| | | return ds; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ§è¡è¿åç»æéçæä½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static SqlDataReader GetReaderByProcedure(string storeProduceName, SqlParameter[] param) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand comm = new SqlCommand(); |
| | | comm.Connection = conn; |
| | | comm.CommandType = CommandType.StoredProcedure; |
| | | comm.CommandText = storeProduceName; |
| | | try |
| | | { |
| | | conn.Open(); |
| | | if (param != null) |
| | | { |
| | | comm.Parameters.AddRange(param); |
| | | } |
| | | return comm.ExecuteReader(CommandBehavior.CloseConnection); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ///å°é误信æ¯åå
¥æ¥å¿ |
| | | //WriteLog("æ§è¡GetReaderByProcedure(string storeProduceName, SqlParameter[] param)æ¶åçé误,é误信æ¯" + ex); |
| | | throw ex; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ§è¡å¢å æ¹æ¹æ³ï¼insertãupdateãdeleteç±»åçSQLè¯å¥ï¼ |
| | | /// </summary> |
| | | /// <param name="sql"></param> |
| | | /// <returns></returns> |
| | | public static int Update(string sql) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(sql, conn); |
| | | try |
| | | { |
| | | conn.Open(); |
| | | return cmd.ExecuteNonQuery(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ§è¡å¸¦åæ°çSQLè¯å¥æåå¨è¿ç¨ |
| | | /// </summary> |
| | | /// <param name="sqlOrProcedure">sqlè¯å¥æåå¨è¿ç¨åç§°</param> |
| | | /// <param name="param">åæ°</param> |
| | | /// <param name="isProcedure">æ¯å¦ä¸ºåå¨è¿ç¨</param> |
| | | /// <returns></returns> |
| | | public static int Update(string sqlOrProcedure, SqlParameter[] param, bool isProcedure) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(sqlOrProcedure, conn); |
| | | if (isProcedure) |
| | | { |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | } |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.Parameters.AddRange(param); |
| | | return cmd.ExecuteNonQuery(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | //WriteErrLog("æ§è¡ public static int Update(string sqlOrProcedure,SqlParameter[] param,bool isProcedure)æ¹æ³æ¶åºé,é误信æ¯" + ex.Message); |
| | | throw ex; |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ§è¡åå¨è¿ç¨ |
| | | /// </summary> |
| | | /// <param name="storedProcName">åå¨è¿ç¨å</param> |
| | | /// <param name="parameters">åå¨è¿ç¨åæ°</param> |
| | | /// <param name="tableName">DataSetç»æä¸ç表å</param> |
| | | /// <returns>DataSet</returns> |
| | | public static DataSet RunProcedure(string storedProcName, IDataParameter[] parameters, string tableName) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | DataSet dataSet = new DataSet(); |
| | | connection.Open(); |
| | | SqlDataAdapter sqlDA = new SqlDataAdapter(); |
| | | sqlDA.SelectCommand = BuildQueryCommand(connection, storedProcName, parameters); |
| | | sqlDA.Fill(dataSet, tableName); |
| | | connection.Close(); |
| | | return dataSet; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æå»º SqlCommand 对象(ç¨æ¥è¿åä¸ä¸ªç»æéï¼è䏿¯ä¸ä¸ªæ´æ°å¼) |
| | | /// </summary> |
| | | /// <param name="connection">æ°æ®åºè¿æ¥</param> |
| | | /// <param name="storedProcName">åå¨è¿ç¨å</param> |
| | | /// <param name="parameters">åå¨è¿ç¨åæ°</param> |
| | | /// <returns>SqlCommand</returns> |
| | | private static SqlCommand BuildQueryCommand(SqlConnection connection, string storedProcName, IDataParameter[] parameters) |
| | | { |
| | | SqlCommand command = new SqlCommand(storedProcName, connection); |
| | | command.CommandType = CommandType.StoredProcedure; |
| | | foreach (SqlParameter parameter in parameters) |
| | | { |
| | | if (parameter != null) |
| | | { |
| | | // æ£æ¥æªåé
å¼çè¾åºåæ°,å°å
¶åé
以DBNull.Value. |
| | | if ((parameter.Direction == ParameterDirection.InputOutput || parameter.Direction == ParameterDirection.Input) && |
| | | (parameter.Value == null)) |
| | | { |
| | | parameter.Value = DBNull.Value; |
| | | } |
| | | command.Parameters.Add(parameter); |
| | | } |
| | | } |
| | | |
| | | return command; |
| | | } |
| | | //ç¨åå¨è¿ç¨æå
¥æ°æ® |
| | | |
| | | public static DataSet GetDataSetByProcedure(string spName, SqlParameter[] param) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(spName, conn); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.Parameters.AddRange(param); |
| | | SqlDataAdapter sda = new SqlDataAdapter(); |
| | | sda.SelectCommand = cmd; |
| | | DataSet ds = new DataSet(); |
| | | sda.Fill(ds, "ds"); |
| | | cmd.Parameters.Clear(); |
| | | return ds; |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | //å°é误信æ¯åå
¥ç³»ç»æ¥å¿ |
| | | string info = "è°ç¨GetReaderByProcedure(string spName, SqlParameter[] param)æ¹æ³æ¶åçé误ï¼" + ex.Message; |
| | | WriteLog(ex.Message); |
| | | throw new Exception(info); |
| | | } |
| | | } |
| | | public static SqlDataReader MyReader(string strSQL) |
| | | { |
| | | SqlConnection connection = new SqlConnection(connectionString); |
| | | SqlCommand cmd = new SqlCommand(strSQL, connection); |
| | | try |
| | | { |
| | | connection.Open(); |
| | | SqlDataReader myReader = cmd.ExecuteReader(); |
| | | return myReader; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | throw new Exception(e.Message); |
| | | } |
| | | finally |
| | | { |
| | | cmd.Dispose(); |
| | | //connection.Close(); |
| | | } |
| | | |
| | | } |
| | | public static int ExecuteSql1(string SQLString, params SqlParameter[] myParameter) |
| | | { |
| | | using (SqlConnection connection = new SqlConnection(connectionString)) |
| | | { |
| | | SqlCommand cmd = new SqlCommand(SQLString, connection); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | cmd.Parameters.AddRange(myParameter); |
| | | |
| | | try |
| | | { |
| | | connection.Open(); |
| | | int rows = cmd.ExecuteNonQuery(); |
| | | return rows; |
| | | } |
| | | catch (System.Data.SqlClient.SqlException e) |
| | | { |
| | | WriteLog(e.Message); |
| | | throw e; |
| | | } |
| | | finally |
| | | { |
| | | |
| | | cmd.Dispose(); |
| | | connection.Close(); |
| | | } |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 使ç¨äºå¡æäº¤å¸¦åæ°çSQLè¯å¥ |
| | | /// </summary> |
| | | /// <param name="mainSql">主SQLè¯å¥</param> |
| | | /// <param name="mainparam">䏻SQL忰</param> |
| | | /// <param name="detailSql">æç»SQL</param> |
| | | /// <param name="detailparam">æç»SQLè¯å¥å¯¹åºçåæ°æ°ç»éå</param> |
| | | /// <returns>è¿åäºå¡æ¯å¦æå</returns> |
| | | public static bool UpdateByTran(string mainSql, SqlParameter[] mainparam, string detailSql, List<SqlParameter[]> detailparam) |
| | | { |
| | | SqlConnection conn = new SqlConnection(connectionString); |
| | | SqlCommand comm = new SqlCommand(); |
| | | comm.Connection = conn; |
| | | try |
| | | { |
| | | conn.Open(); |
| | | comm.Transaction = conn.BeginTransaction();//å¼å¯äºå¡ |
| | | if (mainSql != null && mainSql.Length != 0) |
| | | { |
| | | comm.CommandText = mainSql; |
| | | if (mainparam != null) |
| | | comm.Parameters.AddRange(mainparam); |
| | | comm.ExecuteNonQuery(); |
| | | } |
| | | if (detailparam != null) |
| | | { |
| | | foreach (SqlParameter[] param in detailparam) |
| | | { |
| | | comm.CommandText = detailSql; |
| | | comm.Parameters.Clear();//æ¸
ç©ºåæ° |
| | | comm.Parameters.AddRange(param); |
| | | comm.ExecuteNonQuery(); |
| | | } |
| | | } |
| | | comm.Transaction.Commit();//æäº¤äºå¡ |
| | | return true; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | if (comm.Transaction != null) |
| | | { |
| | | comm.Transaction.Rollback();//åæ»äºå¡ |
| | | } |
| | | WriteLog(ex.Message); |
| | | throw new Exception("å¨è°ç¨ public static bool UpdateByTran(string mainSql,SqlParameter[] mainparam,string detailSql,List<SqlParameter[]> detailparam)æ¹æ³æ¶åºéï¼é误信æ¯" + ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | if (comm.Transaction != null) |
| | | { |
| | | comm.Transaction = null; |
| | | } |
| | | } |
| | | } |
| | | #region SQLé误æ¥å¿è®°å½ |
| | | /// <summary> |
| | | /// SQLé误æ¥å¿è®°å½ |
| | | /// </summary> |
| | | public static void WriteLog(string loginfo) |
| | | { |
| | | FileStream fs = new FileStream("SQLHelper.Log", FileMode.Append); |
| | | StreamWriter sw = new StreamWriter(fs); |
| | | string Log = GetDBSqlDateTime() + " é误信æ¯: " + loginfo; |
| | | sw.WriteLine(Log); |
| | | sw.Close(); |
| | | fs.Close(); |
| | | } |
| | | #endregion |
| | | /// <summary> |
| | | /// è·åæå¡å¨æ¶é´ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static DateTime GetDBSqlDateTime() |
| | | { |
| | | return Convert.ToDateTime(GetSingleResult("select getdate()")); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | |  |
| | | Microsoft Visual Studio Solution File, Format Version 12.00 |
| | | # Visual Studio 2013 |
| | | VisualStudioVersion = 12.0.40629.0 |
| | | MinimumVisualStudioVersion = 10.0.40219.1 |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebAPI", "WebAPI\WebAPI.csproj", "{5B60CE0C-963C-4DC2-91B3-0B471AAC5438}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestAPI", "WindowsFormsApp1\TestAPI.csproj", "{FFED17B5-612D-404C-A9B8-628BA6DC3257}" |
| | | EndProject |
| | | Global |
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| | | Debug|Any CPU = Debug|Any CPU |
| | | Debug|x86 = Debug|x86 |
| | | Release|Any CPU = Release|Any CPU |
| | | Release|x86 = Release|x86 |
| | | EndGlobalSection |
| | | GlobalSection(ProjectConfigurationPlatforms) = postSolution |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Debug|x86.ActiveCfg = Debug|x86 |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Debug|x86.Build.0 = Debug|x86 |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Release|x86.ActiveCfg = Release|x86 |
| | | {5B60CE0C-963C-4DC2-91B3-0B471AAC5438}.Release|x86.Build.0 = Release|x86 |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Debug|x86.ActiveCfg = Debug|x86 |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Debug|x86.Build.0 = Debug|x86 |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Release|x86.ActiveCfg = Release|x86 |
| | | {FFED17B5-612D-404C-A9B8-628BA6DC3257}.Release|x86.Build.0 = Release|x86 |
| | | EndGlobalSection |
| | | GlobalSection(SolutionProperties) = preSolution |
| | | HideSolutionNode = FALSE |
| | | EndGlobalSection |
| | | GlobalSection(ExtensibilityGlobals) = postSolution |
| | | SolutionGuid = {489992F1-3AD6-473D-8B4C-DBEB71452F7B} |
| | | EndGlobalSection |
| | | EndGlobal |
| New file |
| | |
| | | using System.Web.Http; |
| | | using WebActivatorEx; |
| | | using WebAPI; |
| | | using Swashbuckle.Application; |
| | | |
| | | [assembly: PreApplicationStartMethod(typeof(SwaggerConfig), "Register")] |
| | | |
| | | namespace WebAPI |
| | | { |
| | | public class SwaggerConfig |
| | | { |
| | | public static void Register() |
| | | { |
| | | var thisAssembly = typeof(SwaggerConfig).Assembly; |
| | | |
| | | GlobalConfiguration.Configuration |
| | | .EnableSwagger(c => |
| | | { |
| | | // By default, the service root url is inferred from the request used to access the docs. |
| | | // However, there may be situations (e.g. proxy and load-balanced environments) where this does not |
| | | // resolve correctly. You can workaround this by providing your own code to determine the root URL. |
| | | // |
| | | //c.RootUrl(req => GetRootUrlFromAppConfig()); |
| | | |
| | | // If schemes are not explicitly provided in a Swagger 2.0 document, then the scheme used to access |
| | | // the docs is taken as the default. If your API supports multiple schemes and you want to be explicit |
| | | // about them, you can use the "Schemes" option as shown below. |
| | | // |
| | | //c.Schemes(new[] { "http", "https" }); |
| | | |
| | | // Use "SingleApiVersion" to describe a single version API. Swagger 2.0 includes an "Info" object to |
| | | // hold additional metadata for an API. Version and title are required but you can also provide |
| | | // additional fields by chaining methods off SingleApiVersion. |
| | | // |
| | | c.SingleApiVersion("v1", "WebAPI"); |
| | | |
| | | // If your API has multiple versions, use "MultipleApiVersions" instead of "SingleApiVersion". |
| | | // In this case, you must provide a lambda that tells Swashbuckle which actions should be |
| | | // included in the docs for a given API version. Like "SingleApiVersion", each call to "Version" |
| | | // returns an "Info" builder so you can provide additional metadata per API version. |
| | | // |
| | | //c.MultipleApiVersions( |
| | | // (apiDesc, targetApiVersion) => ResolveVersionSupportByRouteConstraint(apiDesc, targetApiVersion), |
| | | // (vc) => |
| | | // { |
| | | // vc.Version("v2", "Swashbuckle Dummy API V2"); |
| | | // vc.Version("v1", "Swashbuckle Dummy API V1"); |
| | | // }); |
| | | |
| | | // You can use "BasicAuth", "ApiKey" or "OAuth2" options to describe security schemes for the API. |
| | | // See https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md for more details. |
| | | // NOTE: These only define the schemes and need to be coupled with a corresponding "security" property |
| | | // at the document or operation level to indicate which schemes are required for an operation. To do this, |
| | | // you'll need to implement a custom IDocumentFilter and/or IOperationFilter to set these properties |
| | | // according to your specific authorization implementation |
| | | // |
| | | //c.BasicAuth("basic") |
| | | // .Description("Basic HTTP Authentication"); |
| | | // |
| | | //c.ApiKey("apiKey") |
| | | // .Description("API Key Authentication") |
| | | // .Name("apiKey") |
| | | // .In("header"); |
| | | // |
| | | //c.OAuth2("oauth2") |
| | | // .Description("OAuth2 Implicit Grant") |
| | | // .Flow("implicit") |
| | | // .AuthorizationUrl("http://petstore.swagger.wordnik.com/api/oauth/dialog") |
| | | // //.TokenUrl("https://tempuri.org/token") |
| | | // .Scopes(scopes => |
| | | // { |
| | | // scopes.Add("read", "Read access to protected resources"); |
| | | // scopes.Add("write", "Write access to protected resources"); |
| | | // }); |
| | | |
| | | // Set this flag to omit descriptions for any actions decorated with the Obsolete attribute |
| | | //c.IgnoreObsoleteActions(); |
| | | |
| | | // Each operation be assigned one or more tags which are then used by consumers for various reasons. |
| | | // For example, the swagger-ui groups operations according to the first tag of each operation. |
| | | // By default, this will be controller name but you can use the "GroupActionsBy" option to |
| | | // override with any value. |
| | | // |
| | | //c.GroupActionsBy(apiDesc => apiDesc.HttpMethod.ToString()); |
| | | |
| | | // You can also specify a custom sort order for groups (as defined by "GroupActionsBy") to dictate |
| | | // the order in which operations are listed. For example, if the default grouping is in place |
| | | // (controller name) and you specify a descending alphabetic sort order, then actions from a |
| | | // ProductsController will be listed before those from a CustomersController. This is typically |
| | | // used to customize the order of groupings in the swagger-ui. |
| | | // |
| | | //c.OrderActionGroupsBy(new DescendingAlphabeticComparer()); |
| | | |
| | | // Swashbuckle makes a best attempt at generating Swagger compliant JSON schemas for the various types |
| | | // exposed in your API. However, there may be occasions when more control of the output is needed. |
| | | // This is supported through the "MapType" and "SchemaFilter" options: |
| | | // |
| | | // Use the "MapType" option to override the Schema generation for a specific type. |
| | | // It should be noted that the resulting Schema will be placed "inline" for any applicable Operations. |
| | | // While Swagger 2.0 supports inline definitions for "all" Schema types, the swagger-ui tool does not. |
| | | // It expects "complex" Schemas to be defined separately and referenced. For this reason, you should only |
| | | // use the "MapType" option when the resulting Schema is a primitive or array type. If you need to alter a |
| | | // complex Schema, use a Schema filter. |
| | | // |
| | | //c.MapType<ProductType>(() => new Schema { type = "integer", format = "int32" }); |
| | | // |
| | | // If you want to post-modify "complex" Schemas once they've been generated, across the board or for a |
| | | // specific type, you can wire up one or more Schema filters. |
| | | // |
| | | //c.SchemaFilter<ApplySchemaVendorExtensions>(); |
| | | |
| | | // Set this flag to omit schema property descriptions for any type properties decorated with the |
| | | // Obsolete attribute |
| | | //c.IgnoreObsoleteProperties(); |
| | | |
| | | // In a Swagger 2.0 document, complex types are typically declared globally and referenced by unique |
| | | // Schema Id. By default, Swashbuckle does NOT use the full type name in Schema Ids. In most cases, this |
| | | // works well because it prevents the "implementation detail" of type namespaces from leaking into your |
| | | // Swagger docs and UI. However, if you have multiple types in your API with the same class name, you'll |
| | | // need to opt out of this behavior to avoid Schema Id conflicts. |
| | | // |
| | | //c.UseFullTypeNameInSchemaIds(); |
| | | |
| | | // In accordance with the built in JsonSerializer, Swashbuckle will, by default, describe enums as integers. |
| | | // You can change the serializer behavior by configuring the StringToEnumConverter globally or for a given |
| | | // enum type. Swashbuckle will honor this change out-of-the-box. However, if you use a different |
| | | // approach to serialize enums as strings, you can also force Swashbuckle to describe them as strings. |
| | | // |
| | | //c.DescribeAllEnumsAsStrings(); |
| | | |
| | | // Similar to Schema filters, Swashbuckle also supports Operation and Document filters: |
| | | // |
| | | // Post-modify Operation descriptions once they've been generated by wiring up one or more |
| | | // Operation filters. |
| | | // |
| | | //c.OperationFilter<AddDefaultResponse>(); |
| | | // |
| | | // If you've defined an OAuth2 flow as described above, you could use a custom filter |
| | | // to inspect some attribute on each action and infer which (if any) OAuth2 scopes are required |
| | | // to execute the operation |
| | | // |
| | | //c.OperationFilter<AssignOAuth2SecurityRequirements>(); |
| | | |
| | | // Post-modify the entire Swagger document by wiring up one or more Document filters. |
| | | // This gives full control to modify the final SwaggerDocument. You should have a good understanding of |
| | | // the Swagger 2.0 spec. - https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md |
| | | // before using this option. |
| | | // |
| | | //c.DocumentFilter<ApplyDocumentVendorExtensions>(); |
| | | |
| | | // If you annonate Controllers and API Types with |
| | | // Xml comments (http://msdn.microsoft.com/en-us/library/b2s063f7(v=vs.110).aspx), you can incorporate |
| | | // those comments into the generated docs and UI. You can enable this by providing the path to one or |
| | | // more Xml comment files. |
| | | // |
| | | //c.IncludeXmlComments(GetXmlCommentsPath()); |
| | | |
| | | // In contrast to WebApi, Swagger 2.0 does not include the query string component when mapping a URL |
| | | // to an action. As a result, Swashbuckle will raise an exception if it encounters multiple actions |
| | | // with the same path (sans query string) and HTTP method. You can workaround this by providing a |
| | | // custom strategy to pick a winner or merge the descriptions for the purposes of the Swagger docs |
| | | // |
| | | //c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First()); |
| | | }) |
| | | .EnableSwaggerUi(c => |
| | | { |
| | | // Use the "InjectStylesheet" option to enrich the UI with one or more additional CSS stylesheets. |
| | | // The file must be included in your project as an "Embedded Resource", and then the resource's |
| | | // "Logical Name" is passed to the method as shown below. |
| | | // |
| | | //c.InjectStylesheet(containingAssembly, "Swashbuckle.Dummy.SwaggerExtensions.testStyles1.css"); |
| | | |
| | | // Use the "InjectJavaScript" option to invoke one or more custom JavaScripts after the swagger-ui |
| | | // has loaded. The file must be included in your project as an "Embedded Resource", and then the resource's |
| | | // "Logical Name" is passed to the method as shown above. |
| | | // |
| | | //c.InjectJavaScript(thisAssembly, "Swashbuckle.Dummy.SwaggerExtensions.testScript1.js"); |
| | | |
| | | // The swagger-ui renders boolean data types as a dropdown. By default, it provides "true" and "false" |
| | | // strings as the possible choices. You can use this option to change these to something else, |
| | | // for example 0 and 1. |
| | | // |
| | | //c.BooleanValues(new[] { "0", "1" }); |
| | | |
| | | // Use this option to control how the Operation listing is displayed. |
| | | // It can be set to "None" (default), "List" (shows operations for each resource), |
| | | // or "Full" (fully expanded: shows operations and their details). |
| | | // |
| | | //c.DocExpansion(DocExpansion.List); |
| | | |
| | | // Use the CustomAsset option to provide your own version of assets used in the swagger-ui. |
| | | // It's typically used to instruct Swashbuckle to return your version instead of the default |
| | | // when a request is made for "index.html". As with all custom content, the file must be included |
| | | // in your project as an "Embedded Resource", and then the resource's "Logical Name" is passed to |
| | | // the method as shown below. |
| | | // |
| | | //c.CustomAsset("index", containingAssembly, "YourWebApiProject.SwaggerExtensions.index.html"); |
| | | |
| | | // If your API has multiple versions and you've applied the MultipleApiVersions setting |
| | | // as described above, you can also enable a select box in the swagger-ui, that displays |
| | | // a discovery URL for each version. This provides a convenient way for users to browse documentation |
| | | // for different API versions. |
| | | // |
| | | //c.EnableDiscoveryUrlSelector(); |
| | | |
| | | // If your API supports the OAuth2 Implicit flow, and you've described it correctly, according to |
| | | // the Swagger 2.0 specification, you can enable UI support as shown below. |
| | | // |
| | | //c.EnableOAuth2Support("test-client-id", "test-realm", "Swagger UI"); |
| | | }); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web.Http; |
| | | |
| | | namespace WebAPI |
| | | { |
| | | public static class WebApiConfig |
| | | { |
| | | public static void Register(HttpConfiguration config) |
| | | { |
| | | // Web API é
ç½®åæå¡ |
| | | GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear(); |
| | | // Web API è·¯ç± |
| | | config.MapHttpAttributeRoutes(); |
| | | |
| | | config.Routes.MapHttpRoute( |
| | | name: "DefaultApi", |
| | | routeTemplate: "api/{controller}/{id}", |
| | | defaults: new { id = RouteParameter.Optional } |
| | | ); |
| | | //èªå®ä¹è·¯ç±ï¼å¹é
å°action |
| | | config.Routes.MapHttpRoute( |
| | | name: "ActionApi", |
| | | routeTemplate: "actionapi/{controller}/{action}/{id}", |
| | | defaults: new { id = RouteParameter.Optional } |
| | | ); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using DAL; |
| | | using Kingdee.BOS.WebApi.Client; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | |
| | | namespace WebAPI.BLL |
| | | { |
| | | public class WebServer |
| | | { |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | |
| | | #region åºç¡èµæ |
| | | /// <summary> |
| | | /// è·åä»åºå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="sErr"></param> |
| | | /// <returns></returns> |
| | | public DataSet GetWarehouseList(string sWhere, ref string sErr) |
| | | { |
| | | |
| | | DataSet ds = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_Warehouse " + sWhere, "h_v_IF_Warehouse"); |
| | | //DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View(); |
| | | return ds; |
| | | } |
| | | /// <summary> |
| | | /// è·åä»ä½å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="sErr"></param> |
| | | /// <returns></returns> |
| | | public DataSet GetStockPlaceList(string sWhere, ref string sErr) |
| | | { |
| | | |
| | | DataSet ds = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_StockPlace " + sWhere, "h_v_IF_StockPlace"); |
| | | //DAL.ClsIF_StockPlace_View dal = new DAL.ClsIF_StockPlace_View(); |
| | | return ds; |
| | | } |
| | | /// <summary> |
| | | /// è·åé¨é¨å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="sErr"></param> |
| | | /// <returns></returns> |
| | | public DataSet GetDepartmentList(string sWhere, ref string sErr) |
| | | { |
| | | |
| | | DataSet ds = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_Department " + sWhere, "h_v_IF_Department"); |
| | | //DAL.ClsIF_Department_View dal = new DAL.ClsIF_Department_View(); |
| | | return ds; |
| | | } |
| | | /// <summary> |
| | | /// èåå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="sErr"></param> |
| | | /// <returns></returns> |
| | | public DataSet GetEmployeeList(string sWhere, ref string sErr) |
| | | { |
| | | |
| | | DataSet ds = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_Emp " + sWhere, "h_v_IF_Emp"); |
| | | //DAL.ClsIF_Employee_View dal = new DAL.ClsIF_Employee_View(); |
| | | return ds; |
| | | } |
| | | /// <summary> |
| | | /// ä¾åºåå表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="sErr"></param> |
| | | /// <returns></returns> |
| | | public DataSet GetSupplierList(string sWhere, ref string sErr) |
| | | { |
| | | DataSet ds = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_Supplier " + sWhere, "h_v_IF_Supplier"); |
| | | //DAL.ClsIF_Supplier_View dal = new DAL.ClsIF_Supplier_View(); |
| | | return ds; |
| | | } |
| | | /// <summary> |
| | | /// 客æ·å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="sErr"></param> |
| | | /// <returns></returns> |
| | | public DataSet GetCustomerList(string sWhere, ref string sErr) |
| | | { |
| | | DataSet ds = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_Customer " + sWhere, "h_v_IF_Customer"); |
| | | //DAL.ClsIF_Customer_View dal = new DAL.ClsIF_Customer_View(); |
| | | return ds; |
| | | } |
| | | #endregion |
| | | /// <summary> |
| | | /// æå°æ¨¡æ¿å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="sErr"></param> |
| | | /// <returns></returns> |
| | | public DataSet GetOpenTmpList(string sWhere, ref string sErr) |
| | | { |
| | | DataSet ds = new DataSet(); |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_OpenTmpList " + sWhere, "h_v_IF_OpenTmpList"); |
| | | return ds; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Converters; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | /// <summary> |
| | | /// Common çæè¦è¯´æ |
| | | /// </summary> |
| | | public class Common |
| | | { |
| | | public Common() |
| | | { |
| | | // |
| | | // TODO: 卿¤å¤æ·»å æé 彿°é»è¾ |
| | | // |
| | | } |
| | | |
| | | public static string DataTableToJSON(DataTable dt) |
| | | { |
| | | try |
| | | { |
| | | string rowsjson = JsonConvert.SerializeObject(dt, new DataTableConverter()); |
| | | string json = @"{""Rows"":" + rowsjson + @",""Total"":""" + dt.Rows.Count.ToString() + @"""}"; |
| | | return json; |
| | | } |
| | | catch (Exception err) |
| | | { |
| | | return "{Rows:[],Total:0}"; |
| | | } |
| | | } |
| | | |
| | | public static string DataTableToJSON(DataTable dt,Int64 HRows) |
| | | { |
| | | try |
| | | { |
| | | string rowsjson = JsonConvert.SerializeObject(dt, new DataTableConverter()); |
| | | string json = @"{""Rows"":" + rowsjson + @",""Total"":""" + HRows.ToString() + @"""}"; |
| | | return json; |
| | | } |
| | | catch (Exception err) |
| | | { |
| | | return "{Rows:[],Total:0}"; |
| | | } |
| | | } |
| | | |
| | | public static Int64 GetRowTotal(string ViewName,string sWhere,ref string sErr) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet dsTotal; |
| | | try |
| | | { |
| | | Int64 RowTotal = 0; |
| | | dsTotal = oCn.RunProcReturn("select count(1) HRows from " + ViewName + " " + sWhere + " ", "gy_czygl"); |
| | | if (dsTotal == null || dsTotal.Tables[0].Rows.Count == 0) |
| | | { |
| | | RowTotal = 0; |
| | | } |
| | | else |
| | | { |
| | | RowTotal = DBUtility.ClsPub.isLong(dsTotal.Tables[0].Rows[0][0]); |
| | | } |
| | | return RowTotal; |
| | | } |
| | | catch (Exception err) |
| | | { |
| | | sErr = err.Message; |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// SQLåç¬¦è½¬æ¢ å»æ ç¹æ®å符 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static bool SQLtoChange(string OldSQL,ref string ViewSQL,ref string ProcSQL) |
| | | { |
| | | try |
| | | { |
| | | ViewSQL = OldSQL.Replace("^^", "'"); |
| | | ViewSQL = ViewSQL.Replace("^*", "%"); |
| | | /////////////////////////// |
| | | ProcSQL = OldSQL.Replace("^^", "''"); |
| | | ProcSQL = ProcSQL.Replace("^*", "%"); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public static string GetSession() |
| | | { |
| | | try |
| | | { |
| | | string s = System.Web.HttpContext.Current.Session["HUserName"].ToString(); |
| | | return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return e.Message; |
| | | } |
| | | } |
| | | |
| | | public static bool HasSession() |
| | | { |
| | | try |
| | | { |
| | | string s = System.Web.HttpContext.Current.Session["HUserName"].ToString(); |
| | | if (s.Trim().Length == 0) |
| | | { |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Code |
| | | { |
| | | public class Test2 |
| | | { |
| | | public int SOrderid; |
| | | public long HMainid; |
| | | public long HSupid; |
| | | public string HDate; |
| | | public string HMaterNumber; |
| | | public string HMaterName; |
| | | public string HMaterModel; |
| | | public string HUnitName; |
| | | public long HQty; |
| | | public long HPrice; |
| | | public long HMoney; |
| | | public string HMTONO; |
| | | public string HDate2; |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Code |
| | | { |
| | | public class TestDAL : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsCg_POInStockBillMain omodel = new Model.ClsCg_POInStockBillMain(); |
| | | public List<Model.ClsCg_POInStockBillSub> DetailColl = new List<Model.ClsCg_POInStockBillSub>(); |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID("1103", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Cg_POInStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HAddress,HSupID,HCurID,HWHID,HExRate" + |
| | | ",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo,HMainSourceBillType,HMainSourceBillNo,HMainSourceEntryID,HMainSourceInterID" + |
| | | ",HBillStatus,HCheckItemNowID,HCheckItemNextID,HCheckFlowID,HBacker,HBackDate) " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ",'" + omodel.HAddress + "'," + omodel.HSupID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HExRate.ToString() + |
| | | ", " + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HMainSourceBillType + "','" + omodel.HMainSourceBillNo + "'," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + |
| | | "," + omodel.HBillStatus + "," + omodel.HCheckItemNowID + "," + omodel.HCheckItemNextID + "," + omodel.HCheckFlowID + ",'','" + omodel.HBackDate + "') "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsCg_POInStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Cg_POInStockBillSub " + |
| | | " (HInterID,HEntryID,HMaterID,HUnitID" + |
| | | ",HDate,HQty,HCheckQty,HPassQty,HBadQty,HPrice" + |
| | | ",HMoney,HWHID,HStatus,HSPID,HCloseMan,HEntryCloseDate" + |
| | | ",HCloseType,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HRelationQty,HRelationMoney" + |
| | | ",HPropertyID,HSecUnitID,HSecUnitRate,HTaxPrice,HTaxMoney,HMainSourceInterID,HBatChNo" + |
| | | ",HAuxPropID,HMTONo,HPlanMode,HERPInterID,HERPEntryID,HReturnedQty,HDetailID) values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID + "," + oSub.HUnitID + |
| | | ",'" + oSub.HDate.ToString() + "'," + oSub.HQty + "," + oSub.HCheckQty + "," + oSub.HPassQty + "," + oSub.HBadQty.ToString() + "," + oSub.HPrice + |
| | | "," + oSub.HMoney + "," + oSub.HWHID + "," + oSub.HStatus + "," + oSub.HSPID + ",'','" + oSub.HEntryCloseDate.ToString() + |
| | | "',0,''," + oSub.HSourceInterID + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo.ToString() + "','" + oSub.HSourceBillType.ToString() + |
| | | "'," + oSub.HPOOrderInterID + ","+ oSub.HPOOrderEntryID + ",'" + oSub.HPOOrderBillNo.ToString() + "'," + oSub.HRelationQty + "," + oSub.HRelationMoney + |
| | | "," + oSub.HPropertyID + ",0," + oSub.HSecUnitRate + "," + oSub.HTaxPrice + "," + oSub.HTaxMoney + "," + oSub.HMainSourceInterID + ",'" + oSub.HBatChNo + |
| | | "'," + oSub.HAuxPropID + ",'" + oSub.HMTONo.ToString() + "'," + oSub.HPlanMode + "," + oSub.HERPInterID + "," + oSub.HERPEntryID + "," + oSub.HReturnedQty + "," + oSub.HDetailID + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsCg_POInStockBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Cg_POInStockBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | // |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using System.Web.Script.Serialization; |
| | | using WebAPI.Code; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | |
| | | public class BarCodeController : ApiController |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | |
| | | |
| | | public T ScriptDeserialize<T>(string strJson) |
| | | { |
| | | JavaScriptSerializer js = new JavaScriptSerializer(); |
| | | return js.Deserialize<T>(strJson); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ´æ°æå°æ¬¡æ° |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="msg2"></param> |
| | | /// <returns></returns> |
| | | [Route("UpdateBarcodePrintQty")] |
| | | [HttpPost] |
| | | public object UpdateBarcodePrintQty([FromBody]JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | oCn.RunProc("exec H_p_SRM_BarCodeBill_PrintQty '" + msg1 + "'"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ´æ°æå°æ¬¡æ°æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ´æ°æå°æ¬¡æ°å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | [Route("GetBarcodeSaveBillVarieties")] |
| | | [HttpPost] |
| | | /// <summary> |
| | | /// çææ¡ç ï¼åç§ç ï¼ |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="msg2"></param> |
| | | /// <returns></returns> |
| | | public object GetBarcodeSaveBill_Varieties([FromBody]JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | List<Model.ClsCg_POInStockBillMain> lsmain = new List<Model.ClsCg_POInStockBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_POInStockMain(msg2); |
| | | foreach (Model.ClsCg_POInStockBillMain oItem in lsmain) |
| | | { |
| | | UserName = oItem.HMaker; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oBill = new DAL.ClsWeb_BarCodeBill(); |
| | | |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | List<Model.ClsGy_MaterialList_WMS_Model> ls = new List<Model.ClsGy_MaterialList_WMS_Model>(); |
| | | List<Model.ClsGy_BarCodeBill_WMS_Model> ls2 = new List<Model.ClsGy_BarCodeBill_WMS_Model>(); |
| | | ls = oListModels.getObjectByJson_MaterialList(msg3); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·²å卿¡ç ï¼ä¸å
许éå¤çæï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (msg2 != string.Empty) |
| | | { |
| | | if (oItemSub.HBQty == 0 || oItemSub.HMinQty == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¡ç å¼ æ°ä¸è½ä¸º0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | long linterid = Pub_Class.ClsPub.CreateBillID_SRMProd("8888", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string TM = ""; //æ¡ç |
| | | string HNumber = ""; //ç©æä»£ç |
| | | double HSumQty = 0; //äº§åæ°é |
| | | double HMinQty = 0; //æå°å
è£
æ° |
| | | int HBQty = 0; //ç®±æ° |
| | | double HQty = 0; //æ°é |
| | | string HMTONO = ""; |
| | | string WeiShu = ""; //å°¾æ° |
| | | //string sKFDate = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | | { |
| | | HNumber = oItemSub.HMaterID.ToString(); |
| | | HMTONO=ClsPub.isStrNull(oItemSub.HMTONO); |
| | | // |
| | | |
| | | HQty = ClsPub.isDoule(oItemSub.HQty); |
| | | HBQty = ClsPub.isInt(oItemSub.HBQty); |
| | | HMinQty = ClsPub.isDoule(oItemSub.HMinQty); |
| | | HSumQty = ClsPub.isDoule(oItemSub.HQty); |
| | | for (int i = 0; i < HBQty; i++) |
| | | { |
| | | //================================== |
| | | TM = "SRM" + HNumber + ";" + HMTONO; |
| | | if (HSumQty - HMinQty > 0) |
| | | { |
| | | WeiShu = ""; |
| | | HSumQty = HSumQty - HMinQty; |
| | | } |
| | | else |
| | | { |
| | | if (HSumQty == HMinQty) |
| | | { |
| | | WeiShu = ""; |
| | | } |
| | | else |
| | | { |
| | | WeiShu = "å°¾æ°"; |
| | | } |
| | | HMinQty = HSumQty; |
| | | } |
| | | |
| | | Model.ClsGy_BarCodeBill_WMS_Model bar = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | |
| | | bar.HBarCode = TM; |
| | | bar.HMaterID = oItemSub.HMaterID; |
| | | bar.HUnitID = oItemSub.HUnitID; |
| | | bar.HQty = HMinQty; |
| | | bar.HEndQty = WeiShu; |
| | | bar.HBatchNo = oItemSub.HBatchNo; |
| | | bar.HKFDate = oItemSub.HKFDate; |
| | | bar.HKFDQDate = oItemSub.HKFDQDate; |
| | | bar.HKFPeriod = DBUtility.ClsPub.isInt(oItemSub.HKFPeriod); |
| | | bar.HSourceBillNo = oItemSub.HSourceBillNo; |
| | | bar.HSourceInterID = oItemSub.HSourceInterID; |
| | | bar.HSourceEntryID = oItemSub.HSourceEntryID; |
| | | bar.HSourceBillType = oItemSub.HSourceBillType; |
| | | bar.HSupID = oItemSub.HSupID; |
| | | bar.HMinQty = oItemSub.HMinQty; |
| | | bar.HMTONO = oItemSub.HMTONO; |
| | | |
| | | ls2.Add(bar); |
| | | } |
| | | } |
| | | } |
| | | |
| | | string HBarCode = ""; |
| | | string HBarCodeType = ""; |
| | | Int64 HMaterID = 0; |
| | | Int64 HUnitID = 0; |
| | | double HQty2 = 0; |
| | | string HBatchNo = ""; |
| | | Int64 HSupID = 0; |
| | | Int64 HGroupID = 0; |
| | | Int64 HPrintQty = 0; |
| | | Int64 HSourceInterID = 0; |
| | | Int64 HSourceEntryID = 0; |
| | | string HSourceBillNo = ""; |
| | | string HSourceBillType = ""; |
| | | Int64 HKFPeriod = 0; |
| | | string HKFDate = ""; |
| | | string HKFDQDate = ""; |
| | | string HWei = ""; |
| | | string HMTONO2 = ""; |
| | | oCn.BeginTran(); |
| | | foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls2) |
| | | { |
| | | HBarCode = ClsPub.isStrNull(oItemSub.HBarCode); |
| | | HMTONO2 = ClsPub.isStrNull(oItemSub.HMTONO); |
| | | HBarCodeType = "åç§ç "; |
| | | HMaterID = ClsPub.isLong(oItemSub.HMaterID); |
| | | HUnitID = ClsPub.isLong(oItemSub.HUnitID); |
| | | HQty2 = ClsPub.isDoule(oItemSub.HQty); |
| | | HBatchNo = ClsPub.isStrNull(oItemSub.HBatchNo); |
| | | HSupID = ClsPub.isInt(oItemSub.HSupID); |
| | | HKFPeriod = ClsPub.isInt(oItemSub.HKFPeriod); |
| | | HKFDate = ClsPub.isStrNull(oItemSub.HKFDate); |
| | | HKFDQDate = ClsPub.isStrNull(oItemSub.HKFDQDate); |
| | | HSourceInterID = ClsPub.isLong(oItemSub.HSourceInterID); |
| | | HSourceEntryID = ClsPub.isLong(oItemSub.HSourceEntryID); |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO2 + "')"); |
| | | //oBill.SaveBarCode(DBUtility.ClsPub.isLong(oItemSub.HMaterID), DBUtility.ClsPub.isLong(oItemSub.HUnitID), DBUtility.ClsPub.isLong(oItemSub.HSupID), DBUtility.ClsPub.isLong(oItemSub.HBQty) |
| | | //, DBUtility.ClsPub.isLong(oItemSub.HMinQty), DBUtility.ClsPub.isLong(oItemSub.HSourceInterID), DBUtility.ClsPub.isLong(oItemSub.HSourceEntryID) |
| | | //, DBUtility.ClsPub.isStrNull(oItemSub.HSourceBillNo), DBUtility.ClsPub.isStrNull(oItemSub.HSourceBillType), DBUtility.ClsPub.isStrNull(oItemSub.HMTONO), DBUtility.ClsPub.isLong(oItemSub.HQty)); |
| | | } |
| | | //ææ¶åªåå¡«å
³èæ°é |
| | | oCn.RunProc("exec H_p_SRM_BarCodeBill_Update_UpdateBillRelateData " + linterid.ToString()); |
| | | oCn.Commit(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "" + e.Message + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "çææ¡ç æåï¼"; |
| | | WebAPIController.Add_Log("æ¡ç 䏿¨", UserName, "çææ¡ç "); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | [Route("GetBarcodeSaveBillOnly")] |
| | | [HttpPost] |
| | | /// <summary> |
| | | /// çææ¡ç å¯ä¸ç |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="msg2"></param> |
| | | /// <returns></returns> |
| | | public object GetBarcodeSaveBill_Only([FromBody]JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | List<Model.ClsCg_POInStockBillMain> lsmain = new List<Model.ClsCg_POInStockBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_POInStockMain(msg2); |
| | | foreach (Model.ClsCg_POInStockBillMain oItem in lsmain) |
| | | { |
| | | UserName = oItem.HMaker; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oBill = new DAL.ClsWeb_BarCodeBill(); |
| | | |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | |
| | | List<Model.ClsGy_MaterialList_WMS_Model> ls = new List<Model.ClsGy_MaterialList_WMS_Model>(); |
| | | List<Model.ClsGy_BarCodeBill_WMS_Model> ls2 = new List<Model.ClsGy_BarCodeBill_WMS_Model>(); |
| | | ls = oListModels.getObjectByJson_MaterialList(msg3); |
| | | |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·²å卿¡ç ï¼ä¸å
许éå¤çæï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (msg2 != string.Empty) |
| | | { |
| | | if (oItemSub.HBQty == 0 || oItemSub.HMinQty == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¡ç å¼ æ°ä¸è½ä¸º0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | //int i = 1; |
| | | long linterid = Pub_Class.ClsPub.CreateBillID_SRMProd("8888", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | int LSHlen = 6; //æµæ°´å·é¿åº¦ |
| | | int SumLen = 10; //æ»é¿åº¦ |
| | | string TM = ""; //æ¡ç |
| | | string HNumber = ""; //ç©æä»£ç |
| | | double HSumQty = 0; //äº§åæ°é |
| | | double HMinQty = 0; //æå°å
è£
æ° |
| | | int HBQty = 0; //ç®±æ° |
| | | double HQty = 0; //æ°é |
| | | int LSH = 0; //æµæ°´å· |
| | | string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符 |
| | | string sDate = ""; //æ¥æ |
| | | string sYear = ""; //å¹´ |
| | | string sPeriod = ""; //æ |
| | | string sDay = ""; //æ¥ |
| | | int k = 0; |
| | | string WeiShu = ""; //å°¾æ° |
| | | //string sKFDate = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | | { |
| | | HNumber = oItemSub.HMaterID.ToString(); |
| | | // |
| | | |
| | | HQty =ClsPub.isDoule(oItemSub.HQty); |
| | | HBQty = ClsPub.isInt(oItemSub.HBQty); |
| | | HMinQty = ClsPub.isDoule(oItemSub.HMinQty); |
| | | HSumQty = ClsPub.isDoule(oItemSub.HQty); |
| | | for (int i = 0; i < HBQty; i++) |
| | | { |
| | | LSH = LSH + 1; |
| | | LSH2 = LSH.ToString(); |
| | | while (LSH2.Length < LSHlen) //å¦ææµæ°´å·å°äº6使°åé¢è¡¥0 |
| | | { |
| | | LSH2 = "0" + LSH2; |
| | | } |
| | | sDate = ClsPub.GetServerDate(0); |
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); |
| | | sDay = "0" + ClsPub.isDate(sDate).Day.ToString(); |
| | | sDay = sDay.Substring(sDay.Length - 2, 2); |
| | | //================================== |
| | | TM = HNumber + sYear + sPeriod + sDay + LSH2; |
| | | while (TM.Length < SumLen) //妿æ¡ç å°äº12使°åé¢è¡¥0 |
| | | { |
| | | TM = "0" + TM; |
| | | } |
| | | TM = "SRM" + TM; |
| | | //TM = "B" + TM; |
| | | if (HSumQty - HMinQty > 0) |
| | | { |
| | | WeiShu = ""; |
| | | HSumQty = HSumQty - HMinQty; |
| | | } |
| | | else |
| | | { |
| | | if (HSumQty == HMinQty) |
| | | { |
| | | WeiShu = ""; |
| | | } |
| | | else |
| | | { |
| | | WeiShu = "å°¾æ°"; |
| | | } |
| | | HMinQty = HSumQty; |
| | | } |
| | | |
| | | |
| | | Model.ClsGy_BarCodeBill_WMS_Model bar = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | |
| | | bar.HBarCode = TM; |
| | | bar.HMaterID = oItemSub.HMaterID; |
| | | bar.HUnitID = oItemSub.HUnitID; |
| | | bar.HQty = HMinQty; |
| | | bar.HEndQty = WeiShu; |
| | | bar.HBatchNo = oItemSub.HBatchNo; |
| | | bar.HKFDate = oItemSub.HKFDate; |
| | | bar.HKFDQDate = oItemSub.HKFDQDate; |
| | | bar.HKFPeriod = DBUtility.ClsPub.isInt(oItemSub.HKFPeriod); |
| | | bar.HSourceBillNo = oItemSub.HSourceBillNo; |
| | | bar.HSourceInterID = oItemSub.HSourceInterID; |
| | | bar.HSourceEntryID = oItemSub.HSourceEntryID; |
| | | bar.HSourceBillType = oItemSub.HSourceBillType; |
| | | bar.HSupID = oItemSub.HSupID; |
| | | bar.HMinQty = oItemSub.HMinQty; |
| | | bar.HMTONO = oItemSub.HMTONO; |
| | | |
| | | ls2.Add(bar); |
| | | } |
| | | } |
| | | } |
| | | string HBarCode = ""; |
| | | string HBarCodeType = ""; |
| | | Int64 HMaterID = 0; |
| | | Int64 HUnitID = 0; |
| | | double HQty2 = 0; |
| | | string HBatchNo = ""; |
| | | Int64 HSupID = 0; |
| | | Int64 HGroupID = 0; |
| | | Int64 HPrintQty = 0; |
| | | Int64 HSourceInterID = 0; |
| | | Int64 HSourceEntryID = 0; |
| | | string HSourceBillNo = ""; |
| | | string HSourceBillType = ""; |
| | | Int64 HKFPeriod = 0; |
| | | string HKFDate = ""; |
| | | string HKFDQDate = ""; |
| | | string HWei = ""; |
| | | string HMTONO = ""; |
| | | oCn.BeginTran(); |
| | | foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub2 in ls2) |
| | | { |
| | | if (ClsPub.isLong(oItemSub2.HMaterID) != 0) |
| | | { |
| | | HBarCode = oItemSub2.HBarCode; |
| | | HMTONO = oItemSub2.HMTONO; |
| | | HBarCodeType = "å¯ä¸ç "; |
| | | HMaterID = ClsPub.isLong(oItemSub2.HMaterID); |
| | | HUnitID = ClsPub.isLong(oItemSub2.HUnitID); |
| | | HQty2 = ClsPub.isDoule(oItemSub2.HQty); |
| | | HBatchNo = ClsPub.isStrNull(oItemSub2.HBatchNo); |
| | | HSupID = ClsPub.isInt(oItemSub2.HSupID); |
| | | HKFPeriod = ClsPub.isInt(oItemSub2.HKFPeriod); |
| | | HKFDate = ClsPub.isStrNull(oItemSub2.HKFDate); |
| | | HKFDQDate = ClsPub.isStrNull(oItemSub2.HKFDQDate); |
| | | HSourceInterID = ClsPub.isLong(oItemSub2.HSourceInterID); |
| | | HSourceEntryID = ClsPub.isLong(oItemSub2.HSourceEntryID); |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub2.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub2.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub2.HEndQty); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); |
| | | oCn.RunProc("exec setLSH '" + DateTime.Today + "'"); |
| | | } |
| | | } |
| | | //ææ¶åªåå¡«å
³èæ°é |
| | | oCn.RunProc("exec H_p_SRM_BarCodeBill_Update_UpdateBillRelateData " + linterid.ToString()); |
| | | |
| | | oCn.Commit(); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "" + e.Message + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "çææ¡ç æåï¼"; |
| | | WebAPIController.Add_Log("æ¡ç 䏿¨", UserName, "çææ¡ç "); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | [Route("GetBarcodeSaveBillBox")] |
| | | [HttpPost] |
| | | /// <summary> |
| | | /// çææ¡ç å
å¤ç®± |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="msg2"></param> |
| | | /// <returns></returns> |
| | | public object GetBarcodeSaveBill_Box([FromBody]JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | List<Model.ClsCg_POInStockBillMain> lsmain = new List<Model.ClsCg_POInStockBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_POInStockMain(msg2); |
| | | foreach (Model.ClsCg_POInStockBillMain oItem in lsmain) |
| | | { |
| | | UserName = oItem.HMaker; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oBill = new DAL.ClsWeb_BarCodeBill(); |
| | | |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | |
| | | List<Model.ClsGy_MaterialList_WMS_Model> ls = new List<Model.ClsGy_MaterialList_WMS_Model>(); |
| | | List<Model.ClsGy_BarCodeBill_WMS_Model> ls2 = new List<Model.ClsGy_BarCodeBill_WMS_Model>(); |
| | | List<Model.ClsGy_BarCodeBill_WMS_Model> ls3 = new List<Model.ClsGy_BarCodeBill_WMS_Model>(); |
| | | ls = oListModels.getObjectByJson_MaterialList(msg3); |
| | | |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (oBill.CheckBarCode(oItemSub.HSourceInterID, oItemSub.HSourceEntryID) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·²å卿¡ç ï¼ä¸å
许éå¤çæï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (msg2 != string.Empty) |
| | | { |
| | | if (oItemSub.HBQty == 0 || oItemSub.HMinQty == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
ç®±å
è£
æ°ä¸è½ä¸º0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oItemSub.HWBQty == 0 || oItemSub.HWXQty == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å¤ç®±å
è£
æ°ä¸è½ä¸º0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | long linterid = Pub_Class.ClsPub.CreateBillID_SRMProd("8888", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | int LSHlen = 6; //æµæ°´å·é¿åº¦ |
| | | int SumLen = 10; //æ»é¿åº¦ |
| | | string TM = ""; //æ¡ç |
| | | string HNumber = ""; //ç©æä»£ç |
| | | double HSumQty = 0; //äº§åæ°é |
| | | double HMinQty = 0; //æå°å
è£
æ° |
| | | int HBQty = 0; //ç®±æ° |
| | | double HQty = 0; //æ°é |
| | | int LSH = 0; //æµæ°´å· |
| | | string LSH2 = ""; //æµæ°´å·è½¬æ¢æå符 |
| | | string sDate = ""; //æ¥æ |
| | | string sYear = ""; //å¹´ |
| | | string sPeriod = ""; //æ |
| | | string sDay = ""; //æ¥ |
| | | string WeiShu = ""; //å°¾æ° |
| | | DataSet Ds; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | Ds = oCn.RunProcReturn("exec GetLSH '" + DateTime.Today + "'", "GetLSH"); |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | | { |
| | | HNumber = oItemSub.HMaterID.ToString(); |
| | | //HNumber = HNumber.Replace(".", ""); |
| | | // |
| | | |
| | | //HQty = Math.Ceiling(HBQty + ClsPub.isDoule(oItemSub.HWBQty)); |
| | | |
| | | HQty = ClsPub.isDoule(oItemSub.HWBQty); |
| | | HBQty = ClsPub.isInt(oItemSub.HWBQty); |
| | | HMinQty = ClsPub.isDoule(oItemSub.HWXQty); |
| | | HSumQty = ClsPub.isDoule(oItemSub.HQty); //HWXQtyCol |
| | | for (int i = 0; i < HBQty; i++) |
| | | { |
| | | LSH = LSH + 1; |
| | | LSH2 = LSH.ToString(); |
| | | while (LSH2.Length < LSHlen) //å¦ææµæ°´å·å°äº6使°åé¢è¡¥0 |
| | | { |
| | | LSH2 = "0" + LSH2; |
| | | } |
| | | sDate = ClsPub.GetServerDate(0); |
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); |
| | | sDay = "0" + ClsPub.isDate(sDate).Day.ToString(); |
| | | sDay = sDay.Substring(sDay.Length - 2, 2); |
| | | //================================== |
| | | TM = HNumber + sYear + sPeriod + sDay + LSH2; |
| | | while (TM.Length < SumLen) //妿æ¡ç å°äº12使°åé¢è¡¥0 |
| | | { |
| | | TM = "0" + TM; |
| | | } |
| | | //TM = "B" + TM; |
| | | TM = "SRM" + "B" + TM; |
| | | |
| | | if (HSumQty - HMinQty > 0) |
| | | { |
| | | WeiShu = ""; |
| | | HSumQty = HSumQty - HMinQty; |
| | | } |
| | | else |
| | | { |
| | | if (HSumQty == HMinQty) |
| | | { |
| | | WeiShu = ""; |
| | | } |
| | | else |
| | | { |
| | | WeiShu = "å°¾æ°"; |
| | | } |
| | | HMinQty = HSumQty; |
| | | } |
| | | |
| | | Model.ClsGy_BarCodeBill_WMS_Model bar = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | bar.HBarCode = TM; |
| | | bar.HMaterID = oItemSub.HMaterID; |
| | | //bar.HMaterNumber = oItemSub.HMaterNumber; |
| | | //bar.HMaterName = oItemSub.HMaterName; |
| | | //bar.HMaterModel = oItemSub.HMaterModel; |
| | | // bar.HModel2 = oItemSub.HModel; |
| | | |
| | | bar.HUnitID = oItemSub.HUnitID; |
| | | //bar.HUnitNumber2 = oItemSub.HUnitNumber; |
| | | //bar.HUnitName2 = oItemSub.HUnitName; |
| | | |
| | | bar.HQty = HMinQty; |
| | | bar.HBatchNo = oItemSub.HBatchNo; |
| | | bar.HKFDate = oItemSub.HKFDate; |
| | | bar.HKFPeriod = oItemSub.HKFPeriod; |
| | | bar.HKFDQDate = oItemSub.HKFDQDate; |
| | | bar.HSourceInterID = oItemSub.HSourceInterID; |
| | | bar.HSourceEntryID = oItemSub.HSourceEntryID; |
| | | bar.HSourceBillNo = oItemSub.HSourceBillNo; |
| | | bar.HSourceBillType = oItemSub.HSourceBillType; |
| | | bar.HMinQty = oItemSub.HMinQty; |
| | | bar.HSupID = oItemSub.HSupID; |
| | | bar.HEndQty = WeiShu; |
| | | bar.HMTONO = oItemSub.HMTONO; |
| | | ls2.Add(bar); |
| | | } |
| | | } |
| | | } |
| | | foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub2 in ls2) |
| | | { |
| | | if (ClsPub.isLong(oItemSub2.HMaterID) != 0) |
| | | { |
| | | long sMaterID = ClsPub.isLong(oItemSub2.HMaterID); |
| | | Ds = oCn.RunProcReturn("exec GetLSH " + sMaterID.ToString(), "GetLSH"); |
| | | string WeiShu1 = ""; //å°¾æ° |
| | | int SumLen2 = 4; |
| | | string TM2 = ""; |
| | | double HWXQty = 0; |
| | | |
| | | LSH = ClsPub.isInt(Ds.Tables[0].Rows[0][0]) + 1; |
| | | // |
| | | HNumber = oItemSub2.HMaterID.ToString(); |
| | | //HMinQty = ClsPub.isDoule(oItemSub2.HMinQtyCol2].Value); |
| | | HWXQty = ClsPub.isDoule(oItemSub2.HMinQty); |
| | | HSumQty = ClsPub.isDoule(oItemSub2.HQty); |
| | | HBQty = ClsPub.isInt(Math.Ceiling(HSumQty / HWXQty)); |
| | | double NXTMQTY = 0; |
| | | for (int i = 0; i < HBQty; i++) |
| | | { |
| | | if (HSumQty <= 0 || HWXQty <= 0) |
| | | { |
| | | break; |
| | | } |
| | | if (HSumQty - HWXQty > 0) |
| | | { |
| | | WeiShu1 = ""; |
| | | NXTMQTY = HWXQty; |
| | | HSumQty = HSumQty - HWXQty; |
| | | } |
| | | else |
| | | { |
| | | if (HSumQty == HWXQty) |
| | | { |
| | | WeiShu1 = ""; |
| | | } |
| | | else |
| | | { |
| | | WeiShu1 = "å°¾æ°"; |
| | | } |
| | | NXTMQTY = HSumQty; //HWXQty |
| | | HWXQty = HSumQty; |
| | | HSumQty = 0; |
| | | } |
| | | sDate = ClsPub.GetServerDate(0); |
| | | sYear = ClsPub.isDate(sDate).Year.ToString().Substring(2, 2); |
| | | sPeriod = "0" + ClsPub.isDate(sDate).Month.ToString(); |
| | | sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2); |
| | | sDay = "0" + ClsPub.isDate(sDate).Day.ToString(); |
| | | sDay = sDay.Substring(sDay.Length - 2, 2); |
| | | // |
| | | // TM = HNumber + sYear + sPeriod + sDay; //æ¡ç |
| | | // |
| | | Model.ClsGy_BarCodeBill_WMS_Model bar2 = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | TM2 = (i + 1).ToString(); |
| | | while (TM2.Length < SumLen2) //妿æ¡ç å°äº12使°åé¢è¡¥0 |
| | | { |
| | | TM2 = "0" + TM2; |
| | | } |
| | | bar2.HMaterID = oItemSub2.HMaterID; |
| | | |
| | | |
| | | bar2.HBarCode = oItemSub2.HBarCode + "-" + TM2; |
| | | |
| | | bar2.HUnitID = oItemSub2.HUnitID; |
| | | bar2.HQty = HWXQty; |
| | | bar2.HBatchNo = DBUtility.ClsPub.isStrNull(oItemSub2.HBatchNo); |
| | | bar2.HKFDate = DBUtility.ClsPub.isStrNull(oItemSub2.HKFDate); |
| | | bar2.HKFDQDate = DBUtility.ClsPub.isStrNull(oItemSub2.HKFDQDate); |
| | | bar2.HKFPeriod = DBUtility.ClsPub.isInt(oItemSub2.HKFPeriod); |
| | | bar2.HSourceInterID = oItemSub2.HSourceInterID; |
| | | bar2.HSourceEntryID = oItemSub2.HSourceEntryID; |
| | | bar2.HSourceBillNo = oItemSub2.HSourceBillNo; |
| | | bar2.HSourceBillType = oItemSub2.HSourceBillType; |
| | | bar2.HSupID = oItemSub2.HSupID; |
| | | bar2.HEndQty = WeiShu1; |
| | | bar2.HMTONO = oItemSub2.HMTONO; |
| | | ls3.Add(bar2); |
| | | } |
| | | } |
| | | } |
| | | string HBarCode = ""; |
| | | string HBarCodeType = ""; |
| | | Int64 HMaterID = 0; |
| | | Int64 HUnitID = 0; |
| | | double HQty2 = 0; |
| | | string HBatchNo = ""; |
| | | Int64 HSupID = 0; |
| | | Int64 HGroupID = 0; |
| | | int HPrintQty = 0; |
| | | Int64 HSourceInterID = 0; |
| | | Int64 HSourceEntryID = 0; |
| | | string HSourceBillNo = ""; |
| | | string HSourceBillType = ""; |
| | | Int64 HKFPeriod = 0; |
| | | string HKFDate = ""; |
| | | string HKFDQDate = ""; |
| | | string HWei = ""; |
| | | string HMTONO = ""; |
| | | oCn.BeginTran(); |
| | | foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls2) |
| | | { |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | | { |
| | | HBarCode = oItemSub.HBarCode.ToString(); |
| | | HMTONO = ClsPub.isStrNull(oItemSub.HMTONO); |
| | | HBarCodeType = "ç®±å·æ¡ç "; |
| | | HMaterID = ClsPub.isLong(oItemSub.HMaterID); |
| | | HUnitID = ClsPub.isLong(oItemSub.HUnitID); |
| | | HQty2 = ClsPub.isDoule(oItemSub.HQty); |
| | | HBatchNo = ClsPub.isStrNull(oItemSub.HBatchNo); |
| | | HSupID = ClsPub.isInt(oItemSub.HSupID); |
| | | HKFPeriod = ClsPub.isInt(oItemSub.HKFPeriod); |
| | | HKFDate = ClsPub.isStrNull(oItemSub.HKFDate); |
| | | HKFDQDate = ClsPub.isStrNull(oItemSub.HKFDQDate); |
| | | HSourceInterID = ClsPub.isLong(oItemSub.HSourceInterID); |
| | | HSourceEntryID = ClsPub.isLong(oItemSub.HSourceEntryID); |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); |
| | | oCn.RunProc("exec setLSH '" + DateTime.Today + "'"); |
| | | } |
| | | } |
| | | foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls3) |
| | | { |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | | { |
| | | HBarCode = oItemSub.HBarCode.ToString(); |
| | | HMTONO = ClsPub.isStrNull(oItemSub.HMTONO); |
| | | HBarCodeType = "ç®±å·å
æ¡ç "; |
| | | HMaterID = ClsPub.isLong(oItemSub.HMaterID); |
| | | HUnitID = ClsPub.isLong(oItemSub.HUnitID); |
| | | HQty2 = ClsPub.isDoule(oItemSub.HQty); |
| | | HBatchNo = ClsPub.isStrNull(oItemSub.HBatchNo); |
| | | HSupID = ClsPub.isInt(oItemSub.HSupID); |
| | | HKFPeriod = ClsPub.isInt(oItemSub.HKFPeriod); |
| | | HKFDate = ClsPub.isStrNull(oItemSub.HKFDate); |
| | | HKFDQDate = ClsPub.isStrNull(oItemSub.HKFDQDate); |
| | | HSourceInterID = ClsPub.isLong(oItemSub.HSourceInterID); |
| | | HSourceEntryID = ClsPub.isLong(oItemSub.HSourceEntryID); |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); |
| | | } |
| | | } |
| | | //ææ¶åªåå¡«å
³èæ°é |
| | | oCn.RunProc("exec H_p_SRM_BarCodeBill_Update_UpdateBillRelateData " + linterid.ToString()); |
| | | oCn.Commit(); |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "" + e.Message + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "çææ¡ç æåï¼"; |
| | | WebAPIController.Add_Log("æ¡ç 䏿¨", UserName, "çææ¡ç "); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | [Route("GetHBarCodeShowBillSub2")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// æ¡ç å表 |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | public object GetHBarCodeShowBillSub2(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oClsWeb_BarCodeBill = new DAL.ClsWeb_BarCodeBill(); |
| | | ds = oClsWeb_BarCodeBill.ShowBillSub4(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæåï¼"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·ååæ®è¡¨ä½å¤±è´¥:" + e.Message; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | [Route("GetHBarCodeShowBillSub3")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// æ¡ç å表 |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | public object GetHBarCodeShowBillSub3(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oClsWeb_BarCodeBill = new DAL.ClsWeb_BarCodeBill(); |
| | | ds = oClsWeb_BarCodeBill.ShowBillSub5(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæåï¼"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·ååæ®è¡¨ä½å¤±è´¥:" + e.Message; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | [Route("GetHBarCodeShowBillSub4")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// æ¡ç å表 |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | public object GetHBarCodeShowBillSub4(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oClsWeb_BarCodeBill = new DAL.ClsWeb_BarCodeBill(); |
| | | ds = oClsWeb_BarCodeBill.ShowBillSub6(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæåï¼"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·ååæ®è¡¨ä½å¤±è´¥:" + e.Message; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | [Route("GetHBarCodeShowBillMain")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// æ¡ç çæè¡¨å¤´ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | public object GetHBarCodeShowBillMain(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oClsWeb_BarCodeBill = new DAL.ClsWeb_BarCodeBill(); |
| | | ds = oClsWeb_BarCodeBill.ShowBillMain1(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | [Route("GetHBarCodeShowBillSub")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// æ¡ç çæè¡¨ä½ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | public object GetHBarCodeShowBillSub(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsWeb_BarCodeBill oClsWeb_BarCodeBill = new DAL.ClsWeb_BarCodeBill(); |
| | | ds = oClsWeb_BarCodeBill.ShowBillSub(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// æ¡ç æ¡£æ¡å表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetBarCodeShowList")] |
| | | [HttpGet] |
| | | public object GetBarCodeShowList(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("h_v_SRM_BarCodeBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec h_p_SRM_BarCodeBillList '" + PcWhere + "'", "h_v_SRM_BarCodeBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Code; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class EntrustOrderController : ApiController |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | |
| | | /// <summary> |
| | | /// éè´åå表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetEntrustOrderBill")] |
| | | [HttpGet] |
| | | //éè´è®¢åå表 |
| | | public object GetEntrustOrderBill(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("H_v_SRM_EntrustOrderBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec H_p_SRM_EntrustOrderBillList '" + PcWhere + "'", "H_p_SRM_EntrustOrderBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// å§å¤è®¢åè¡¨å¤´ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | [Route("GetEntrustOrderShowBillMain")] |
| | | [HttpGet] |
| | | public object GetEntrustOrderShowBillMain(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsWW_EntrustOrderBill oClsWW_EntrustOrderBill = new DAL.ClsWW_EntrustOrderBill(); |
| | | ds = oClsWW_EntrustOrderBill.ShowBillMainTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// å§å¤è®¢åæç»è¡¨ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <param name="sMsg2"></param> |
| | | /// <returns></returns> |
| | | [Route("GetEntrustOrderShowBillSub")] |
| | | [HttpGet] |
| | | public object GetEntrustOrderShowBillSub(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds = null; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsWW_EntrustOrderBill oClsWW_EntrustOrderBill = new DAL.ClsWW_EntrustOrderBill(); |
| | | ds = oClsWW_EntrustOrderBill.ShowBillSubTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //return DBUtility.ClsPub.sExeReturnInfo; |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | //return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | [Route("EntrustOrderAccept")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// è®¢åæ¥å |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | public object EntrustOrderAccept(string HInterID, string HBillNo, string HUser) |
| | | { |
| | | try |
| | | { |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥å失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsWW_EntrustOrderBill oBill = new DAL.ClsWW_EntrustOrderBill(); |
| | | oBill.WebAccept(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ¥åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥å失败ï¼"+e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | [Route("EntrustOrderRefuse")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// 订åæç» |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | public object EntrustOrderRefuse(string HInterID, string HBillNo, string HUser, string HBackRemark) |
| | | { |
| | | try |
| | | { |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsWW_EntrustOrderBill oBill = new DAL.ClsWW_EntrustOrderBill(); |
| | | oBill.WebRefuse(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), DBUtility.ClsPub.isStrNull(HBackRemark), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æç»æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Code; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class PODemandPlanController : ApiController |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | |
| | | /// <summary> |
| | | /// éè´åå表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPODemandPlanBill")] |
| | | [HttpGet] |
| | | //éè´è®¢åå表 |
| | | public object GetPODemandPlanBill(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("H_v_SRM_PODemandPlanBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec H_p_SRM_PODemandPlanBillList '" + PcWhere + "'", "H_p_SRM_PODemandPlanBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// è¦è´§éç¥åè¡¨å¤´ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPODemandPlanShowBillMain")] |
| | | [HttpGet] |
| | | public object GetPODemandPlanShowBillMain(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsSRM_PODemandPlanBill oClsSRM_PODemandPlanBill = new DAL.ClsSRM_PODemandPlanBill(); |
| | | ds = oClsSRM_PODemandPlanBill.ShowBillMainTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// è¦è´§éç¥åæç»è¡¨ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <param name="sMsg2"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPODemandPlanShowBillSub")] |
| | | [HttpGet] |
| | | public object GetPODemandPlanShowBillSub(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds = null; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsSRM_PODemandPlanBill oClsSRM_PODemandPlanBill = new DAL.ClsSRM_PODemandPlanBill(); |
| | | ds = oClsSRM_PODemandPlanBill.ShowBillSubTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //return DBUtility.ClsPub.sExeReturnInfo; |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | //return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | [Route("PODemandPlanAccept")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// è®¢åæ¥å |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | public object PODemandPlanAccept(string HInterID, string HEntryID, string HBillNo, string HUser) |
| | | { |
| | | try |
| | | { |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥å失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsSRM_PODemandPlanBill oBill = new DAL.ClsSRM_PODemandPlanBill(); |
| | | oBill.WebAccept(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isLong(HEntryID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ¥åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥å失败ï¼"+e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | [Route("PODemandPlanRefuse")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// 订åæç» |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | public object PODemandPlanRefuse(string HInterID, string HEntryID, string HBillNo, string HUser, string HBackRemark) |
| | | { |
| | | try |
| | | { |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsSRM_PODemandPlanBill oBill = new DAL.ClsSRM_PODemandPlanBill(); |
| | | oBill.WebRefuse(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isLong(HEntryID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), DBUtility.ClsPub.isStrNull(HBackRemark), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æç»æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Code; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class POInStockBackController : ApiController |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | |
| | | /// <summary> |
| | | /// éè´§åå表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOInStockBackBillList")] |
| | | [HttpGet] |
| | | public object GetPOInStockBackBillList(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | if (msg == null) |
| | | { |
| | | msg = ""; |
| | | } |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=''" + HSupNo.Trim() + "'') " + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | return ""; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("h_v_SRM_POInStockBackBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec h_p_SRM_POInStockBackBillList '" + PcWhere + "'", "h_p_SRM_POInStockBackBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Code; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class POInStockController : ApiController |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | |
| | | /// <summary> |
| | | /// æ´æ°æå°æ¬¡æ° |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="msg2"></param> |
| | | /// <returns></returns> |
| | | [Route("UpdatePOInStockBillPrintQty")] |
| | | [HttpPost] |
| | | public object UpdatePOInStockBillPrintQty([FromBody]JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | oCn.RunProc("exec H_p_SRM_POInStockBill_PrintQty " + msg1.ToString()); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ´æ°æå°æ¬¡æ°æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ´æ°æå°æ¬¡æ°å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çæéè´§ååæ®å·ãæ¥æ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | [Route("GetNewPOInStockBillNo")] |
| | | [HttpGet] |
| | | public object GetNewPOInStockBillNo(string sMsg, string sMsg3) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds = new DataSet(); |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ æç主é®"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(sMsg3) == "") |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ æçåæ®ç±»å"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | string HBillNo,HDate; |
| | | HBillNo = DBUtility.ClsPub.CreateBillCode_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo,true); |
| | | HDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //å建临æ¶è¡¨ |
| | | DataTable dt = new DataTable(); |
| | | //å建表ä¸çå |
| | | dt.Columns.Add("HBillNo", typeof(string));//æ·»å å |
| | | dt.Columns.Add("HDate", typeof(string));//æ·»å å |
| | | DataRow row = dt.NewRow(); |
| | | //ç»åèµå¼ |
| | | row["HBillNo"] = HBillNo; |
| | | row["HDate"] = HDate; |
| | | //ææå¼çåæ·»å å°è¡¨ |
| | | dt.Rows.Add(row); |
| | | //æè¡¨æ·»å å°dataset |
| | | ds.Tables.Add(dt); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ²¡æè¿åä»»ä½è®°å½"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// çæéè´§åè¡¨å¤´ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | [Route("GetNewPOInStockShowBillMain")] |
| | | [HttpGet] |
| | | public object GetNewPOInStockShowBillMain(string sMsg, string sMsg3) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ æç主é®"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(sMsg3) == "") |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ æçåæ®ç±»å"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsCg_POInStockBill oClsCg_POInStockBill = new DAL.ClsCg_POInStockBill(); |
| | | ds = oClsCg_POInStockBill.ShowNewBillMainTo(DBUtility.ClsPub.isLong(sMsg), DBUtility.ClsPub.isStrNull(sMsg3), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ²¡æè¿åä»»ä½è®°å½"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// çæéè´§åæç»è¡¨ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <param name="sMsg2"></param> |
| | | /// <returns></returns> |
| | | [Route("GetNewPOInStockShowBillSub")] |
| | | [HttpGet] |
| | | public object GetNewPOInStockShowBillSub(string sMsg, string sMsg2, string sMsg3) |
| | | { |
| | | |
| | | try |
| | | { |
| | | DataSet ds = null; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ æç主é®"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(sMsg3) == "") |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·åå¤±è´¥ï¼æ æçåæ®ç±»å"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsCg_POInStockBill oClsCg_POInStockBill = new DAL.ClsCg_POInStockBill(); |
| | | ds = oClsCg_POInStockBill.ShowNewBillSubTo(DBUtility.ClsPub.isLong(sMsg), DBUtility.ClsPub.isStrNull(sMsg2), DBUtility.ClsPub.isStrNull(sMsg3), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | //return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// ä¿åéè´§å |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="msg2"></param> |
| | | /// <returns></returns> |
| | | [Route("SaverPOInStock")] |
| | | [HttpPost] |
| | | public object SaverPOInStock([FromBody]JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | |
| | | string UserName=""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | DAL.ClsCg_POInStockBill oBill = new DAL.ClsCg_POInStockBill(); |
| | | List<Model.ClsCg_POInStockBillMain> lsmain = new List<Model.ClsCg_POInStockBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_POInStockMain(msg2); |
| | | foreach (Model.ClsCg_POInStockBillMain oItem in lsmain) |
| | | { |
| | | //oItem.HMaker = ""; |
| | | UserName=oItem.HMaker; |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HCurID = 1; |
| | | oItem.HExRate = 1; |
| | | oItem.HMainSourceInterID = oItem.HInterID; |
| | | oItem.HInterID = 0; |
| | | //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDHDate)=="") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æå¡«åé¢è®¡å°è´§æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Model.ClsCg_POInStockBillSub> ls = new List<Model.ClsCg_POInStockBillSub>(); |
| | | ls = oListModels.getObjectByJson_POInStockSub(msg3); |
| | | int i = 0; |
| | | foreach (Model.ClsCg_POInStockBillSub oItemSub in ls) |
| | | { |
| | | i++; |
| | | if (oItemSub.HQty<=0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç¬¬"+ i.ToString()+"è¡æ°éä¸å¤§äº0æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (oItemSub.HQty > oItemSub.HRQty) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç¬¬" + i.ToString() + "è¡æ°éä¸è½å¤§äºæªå
³èæ°éï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(oItemSub.HBatChNo)=="") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç¬¬" + i.ToString() + "è¡æªå¡«åæ¹å·ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oItemSub.HEntryID = i; |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HRemark = ""; |
| | | oItemSub.HCloseMan = ""; |
| | | oItemSub.HCloseType = false; |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //ä¿åå夿(åæ®å·éå¤ï¼ç¬å½é¡¹ç®) |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// éè´§åå表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOInStockBill")] |
| | | [HttpGet] |
| | | //éè´§åå表 |
| | | public object GetPOInStockBill(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("H_v_SRM_POInStockBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec H_p_SRM_POInStockBillList '" + PcWhere + "'", "H_p_SRM_POInStockBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// éè´§åè¡¨å¤´ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOInStockShowBillMain")] |
| | | [HttpGet] |
| | | public object GetPOInStockShowBillMain(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string s = ""; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsCg_POInStockBill oClsCg_POInStockBill = new DAL.ClsCg_POInStockBill(); |
| | | ds = oClsCg_POInStockBill.ShowBillMainTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// éè´§åæç»è¡¨ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <param name="sMsg2"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOInStockShowBillSub")] |
| | | [HttpGet] |
| | | public object GetPOInStockShowBillSub(string sMsg) |
| | | { |
| | | //string sMsg="28"; |
| | | //string sMsg2 = "28,5;" |
| | | try |
| | | { |
| | | DataSet ds = null; |
| | | //string s = ""; |
| | | //string sMsg3 = "'" + sMsg2 + "'"; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsCg_POInStockBill oClsCg_POInStockBill = new DAL.ClsCg_POInStockBill(); |
| | | ds = oClsCg_POInStockBill.ShowBillSubTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //return DBUtility.ClsPub.sExeReturnInfo; |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | //return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //[Route("POInStockAccept")] |
| | | //[HttpGet] |
| | | ///// <summary> |
| | | ///// è®¢åæ¥å |
| | | ///// </summary> |
| | | ///// <param name="HInterID"></param> |
| | | ///// <returns></returns> |
| | | //public object POInStockAccept(string HInterID,string HEntryID,long HBillType,string HUser) |
| | | //{ |
| | | // try |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ¥å失败ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // DAL.ClsSRM_POInStockBill oBill = new DAL.ClsSRM_POInStockBill(); |
| | | // oBill.WebAccept_Sub(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isLong(HEntryID), DBUtility.ClsPub.isLong(HBillType), DBUtility.ClsPub.isStrNull(HUser), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "æ¥åæåï¼"; |
| | | // objJsonResult.data = 1; |
| | | // return objJsonResult; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ¥å失败ï¼"+e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | // [Route("POInStockRefuse")] |
| | | // [HttpGet] |
| | | // /// <summary> |
| | | // /// 订åæç» |
| | | // /// </summary> |
| | | // /// <param name="HInterID"></param> |
| | | // /// <returns></returns> |
| | | // public object POInStockRefuse(string HInterID, string HEntryID,string HBackRemark, long HBillType,string HUser) |
| | | // { |
| | | // try |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "失败ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // DAL.ClsSRM_POInStockBill oBill = new DAL.ClsSRM_POInStockBill(); |
| | | // oBill.WebRefuse_Sub(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isLong(HEntryID), DBUtility.ClsPub.isStrNull(HBackRemark), DBUtility.ClsPub.isLong(HBillType),DBUtility.ClsPub.isStrNull(HUser), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "æç»æåï¼"; |
| | | // objJsonResult.data = 1; |
| | | // return objJsonResult; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "失败ï¼" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Code; |
| | | using WebAPI.Models; |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class POOrderController : ApiController |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | |
| | | /// <summary> |
| | | /// éè´åå表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOOrderBill")] |
| | | [HttpGet] |
| | | //éè´è®¢åå表 |
| | | public object GetPOOrderBill(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("H_v_SRM_POOrderBillList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec H_p_SRM_POOrderBillList '" + PcWhere + "'", "H_p_SRM_POOrderBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// éè´è®¢åè¡¨å¤´ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOOrderShowBillMain")] |
| | | [HttpGet] |
| | | public object GetPOOrderShowBillMain(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsCg_POOrderBill oClsCg_POOrderBill = new DAL.ClsCg_POOrderBill(); |
| | | ds = oClsCg_POOrderBill.ShowBillMainTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// éè´è®¢åæç»è¡¨ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="sMsg"></param> |
| | | /// <param name="sMsg2"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOOrderShowBillSub")] |
| | | [HttpGet] |
| | | public object GetPOOrderShowBillSub(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds = null; |
| | | string ShowItem = " * ";//æ¾ç¤ºçåæ®µ |
| | | if (DBUtility.ClsPub.isLong(sMsg) == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | DAL.ClsCg_POOrderBill oClsCg_POOrderBill = new DAL.ClsCg_POOrderBill(); |
| | | ds = oClsCg_POOrderBill.ShowBillSubTo(DBUtility.ClsPub.isLong(sMsg), ShowItem, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | //return DBUtility.ClsPub.sExeReturnInfo; |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | //return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | [Route("POOrderAccept")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// è®¢åæ¥å |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | public object POOrderAccept(string HInterID, string HBillNo,string HUser) |
| | | { |
| | | try |
| | | { |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥å失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsCg_POOrderBill oBill = new DAL.ClsCg_POOrderBill(); |
| | | oBill.WebAccept(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ¥åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥å失败ï¼"+e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | [Route("POOrderRefuse")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// 订åæç» |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <returns></returns> |
| | | public object POOrderRefuse(string HInterID, string HBillNo, string HUser, string HBackRemark) |
| | | { |
| | | try |
| | | { |
| | | if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsCg_POOrderBill oBill = new DAL.ClsCg_POOrderBill(); |
| | | oBill.WebRefuse(DBUtility.ClsPub.isLong(HInterID), DBUtility.ClsPub.isStrNull(HBillNo), DBUtility.ClsPub.isStrNull(HUser), DBUtility.ClsPub.isStrNull(HBackRemark), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æç»æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using WebAPI.Code; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class ReportController : ApiController |
| | | { |
| | | |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè´è®¢åè·è¸ªè¡¨ |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetPOOrderBillProcReport")] |
| | | [HttpGet] |
| | | //éè´è®¢åè·è¸ªè¡¨ |
| | | public object GetPOOrderBillProcReport(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("h_v_SRM_POOrderBillProcReport", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec h_p_SRM_POOrderBillProcReport '" + PcWhere + "'", "h_p_SRM_POOrderBillProcReport"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// å§å¤è®¢åè·è¸ªè¡¨ |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetEntrustBillProcReport")] |
| | | [HttpGet] |
| | | //å§å¤è®¢åè·è¸ªè¡¨ |
| | | public object GetEntrustBillProcReport(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("h_v_SRM_EntrustBillProcReport", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec h_p_SRM_EntrustBillProcReport '" + PcWhere + "'", "h_p_SRM_EntrustBillProcReport"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè´§åè·è¸ªè¡¨ |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetSendGoodsProcReport")] |
| | | [HttpGet] |
| | | //éè´§åè·è¸ªè¡¨ |
| | | public object GetSendGoodsProcReport(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and hsupid in (select HItemID from h_v_IF_Supplier where hnumber=^^" + HSupNo.Trim() + "^^) " + sqlWhere; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("h_v_SRM_SendGoodsProcReport", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec h_p_SRM_SendGoodsProcReport '" + PcWhere + "'", "h_p_SRM_POOrderBillProcReport"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using DAL; |
| | | using Model; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.BLL; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class WebAPIController : ApiController |
| | | { |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | private json objjson = new json(); |
| | | // private POInStockBillServices oclscg_poinstockbillmain = new POInStockBillServices(); |
| | | public string sWhere = ""; |
| | | public WebServer webserver = new WebServer(); |
| | | public DataSet ds = new DataSet(); |
| | | |
| | | public static string GetSession(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | string s = Common.GetSession(); |
| | | return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return ""; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åå
¥æ¥å¿ |
| | | /// </summary> |
| | | public static bool Add_Log(string WorkList, string CurUserName, string State) |
| | | { |
| | | |
| | | DBUtility.ClsPub.SetIPAddress(); |
| | | string IPAddress; |
| | | string ComputerName; |
| | | IPAddress = DBUtility.ClsPub.IPAddress; |
| | | ComputerName = DBUtility.ClsPub.ComputerName; |
| | | ClsCNSRM oCnLoc = new ClsCNSRM(); |
| | | try |
| | | { |
| | | oCnLoc.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + |
| | | "(getdate(),'" + CurUserName + "','" + ComputerName + "','" + WorkList + "','SRMç³»ç»','" + IPAddress + "','" + State + "')" |
| | | ); |
| | | |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return false; |
| | | |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// æ¥å¿å表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <param name="NowPage"></param> |
| | | /// <param name="OnePage"></param> |
| | | /// <returns></returns> |
| | | [Route("GetSystemLog")] |
| | | [HttpGet] |
| | | //éè´§åå表 |
| | | public object GetSystemLog(string HSupNo, string sqlWhere) |
| | | { |
| | | string msg = ""; |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | | string PcWhere = ""; |
| | | SQLHelper.ClsCNSRM oCn = new SQLHelper.ClsCNSRM(); |
| | | DataSet ds; |
| | | //å
¶ä»è¿æ»¤ |
| | | if (msg.Trim() == "") |
| | | { |
| | | msg = " Where ç¨æ·å=^^" + HSupNo.Trim() + "^^ " + sqlWhere; |
| | | // msg = " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | else |
| | | { |
| | | msg = msg + " and ç¨æ·å=^^" + HSupNo.Trim() + "^^" + sqlWhere; |
| | | // msg = msg + " Where hsupid in (select hsupid from Gy_UserSupplierRelation where HUserID=^^" + System.Web.HttpContext.Current.Session["HUserName"].ToString() + "^^)"; |
| | | } |
| | | //转æ¢ç¹æ®å符 |
| | | if (Common.SQLtoChange(msg, ref VsWhere, ref PcWhere) == false) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | //è·åæ»è¡æ° |
| | | Int64 RowTotal = Common.GetRowTotal("h_v_SRM_SystemLogList", VsWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è·åè¿åæ°æ® |
| | | ds = oCn.RunProcReturn("exec h_p_SRM_SystemLogList '" + PcWhere + "'", "h_p_SRM_SystemLogList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "è·åæå"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// ç»å½ |
| | | /// </summary> |
| | | /// <param name="UserName">ç¨æ·å</param> |
| | | /// <param name="PassWord">å¯ç </param> |
| | | /// <returns></returns> |
| | | [Route("GetUser")] |
| | | [HttpGet] |
| | | public object GetUser(string UserName, string PassWord) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds = null; |
| | | ClsCNSRM oCnLoc = new ClsCNSRM(); |
| | | DAL.ClsUser oUser = new DAL.ClsUser(); |
| | | ds = oUser.CheckCzymc(UserName.Trim(), DBUtility.ClsPub.StrToPsd(PassWord.Trim())); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å¯ç é误ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ç»å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | Add_Log("主çé¢", UserName, "ç»å½"); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ç»å½å¼å¸¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// ä¿®æ¹å¯ç |
| | | /// </summary> |
| | | /// <param name="UserName"></param> |
| | | /// <param name="PassWord"></param> |
| | | /// <returns></returns> |
| | | [Route("GetXGPassword")] |
| | | [HttpGet] |
| | | public object GetXGPassword(string UserName, string oldPassword, string PassWord, string Repassword) |
| | | { |
| | | try |
| | | { |
| | | ClsCNSRM oCn = new ClsCNSRM(); |
| | | DataSet oDs = new DataSet(); |
| | | //========== |
| | | if (PassWord.Trim() != Repassword.Trim()) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "2次å¯ç ä¸ä¸è´ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | //=========== |
| | | oDs = oCn.RunProcReturn("select Czmm from Gy_Czygl where Czybm='" + UserName + "'", "Gy_Czygl"); |
| | | if (oDs == null || oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿ä¸ªç¨æ·ï¼ä¸è½ä¿®æ¹å¯ç ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | else |
| | | { |
| | | oCn.RunProc("update Gy_Czygl set Czmm='" + DBUtility.ClsPub.StrToPsd(PassWord.Trim()) + "' where Czybm='" + UserName.Trim() + "'"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "* å¯ç ä¿®æ¹æåï¼"; |
| | | objJsonResult.data = null; |
| | | Add_Log("主çé¢", UserName, "ä¿®æ¹å¯ç "); |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | catch (Exception) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿®æ¹å¯ç å¼å¸¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | } |
| | | ///// <summary> |
| | | ///// 确认交æ |
| | | ///// </summary> |
| | | ///// <param name="HInterID"></param> |
| | | ///// <param name="HEntryID"></param> |
| | | ///// <param name="HState"></param> |
| | | ///// <returns></returns> |
| | | //[Route("UpdateBill")] |
| | | //[HttpGet] |
| | | //public object UpdateBill(int HInterID, int HEntryID, int HState) |
| | | //{ |
| | | // try |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(HInterID) == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "N,项ç®ä¸åå¨ï¼"; |
| | | // objJsonResult.data = 1; |
| | | // return objJsonResult; |
| | | // } |
| | | // DAL.ClsKf_POStockInBill_K3 oBill = new DAL.ClsKf_POStockInBill_K3(); |
| | | // if (oBill.UpdateBill(HInterID, HEntryID, HState) == "Y") |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "确认æåï¼"; |
| | | // objJsonResult.data = 1; |
| | | // return objJsonResult; |
| | | // } |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "确认失败ï¼"; |
| | | // objJsonResult.data = 1; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "确认失败ï¼" + e.ToString(); |
| | | // objJsonResult.data = 1; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// è·åæå°æ¨¡æ¿å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetOpenTmpList_Json")] |
| | | [HttpGet] |
| | | public object GetOpenTmpList_Json(string HNumber) |
| | | { |
| | | sWhere = " Where 1=1 "; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (HNumber != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber = '" + HNumber + "') "; |
| | | } |
| | | try |
| | | { |
| | | ds = webserver.GetOpenTmpList(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("SaveOpenTmp")] |
| | | [HttpGet] |
| | | public object SaveOpenTmp(string HNumber, string HName) |
| | | { |
| | | ClsCNSRM oCn = new ClsCNSRM(); |
| | | try |
| | | { |
| | | |
| | | oCn.BeginTran(); |
| | | oCn.RunProc("Insert into SRM_OpenTmp " + |
| | | " (HNumber,HModel,HName) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HName + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | //oCn.RunProc("Update Gy_OpenTmp set HEndflag=0 where HItemID=" + oModel.HParentID, ref ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "ä¿åæå!"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "ä¿å失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// å é¤å°æ¨¡æ¿ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("DelOpenTmp")] |
| | | [HttpGet] |
| | | public object DelOpenTmp(string HItemID) |
| | | { |
| | | ClsCNSRM oCn = new ClsCNSRM(); |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | oCn.RunProc("Delete from SRM_OpenTmp where HItemID='" + DBUtility.ClsPub.isLong(HItemID) + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "å 餿å!"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "å é¤å¤±è´¥" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | |
| | | } |
| | | #region åºç¡èµæ |
| | | /// <summary> |
| | | /// è·åä»åºå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetWarehouseList_Json")] |
| | | [HttpGet] |
| | | public object GetWarehouseList_Json(string Warehouse) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //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 + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | ds = webserver.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> |
| | | /// è·åä»ä½å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetStockPlaceList_Json")] |
| | | [HttpGet] |
| | | public object GetStockPlaceList_Json(string StockPlace, Int64 HWhID) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //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 ( 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); |
| | | 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("GetSupplierList_Json")] |
| | | [HttpGet] |
| | | public object GetSupplierList_Json(string Supplier) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (Supplier != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + Supplier + "%' or HName like '%" + Supplier + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | ds = webserver.GetSupplierList(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("GetCustomerList_Json")] |
| | | [HttpGet] |
| | | public object GetCustomerList_Json(string Customer) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (Customer != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + Customer + "%' or HName like '%" + Customer + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | ds = webserver.GetCustomerList(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("GetEmployeeList_Json")] |
| | | [HttpGet] |
| | | public object GetEmployeeList_Json(string Employee, Int64 HGroupID) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (HGroupID == 0) |
| | | { |
| | | if (Employee != "") |
| | | { |
| | | sWhere = " Where HStopFlag=0 and ( HNumber like '%" + Employee + "%' or HName like '%" + Employee + "%' ) "; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " Where HStopFlag=0 "; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (Employee != "") |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HWHID=" + HGroupID.ToString() + " and ( HNumber like '%" + Employee + "%' or HName like '%" + Employee + "%' ) "; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HWHID=" + HGroupID.ToString(); |
| | | } |
| | | } |
| | | try |
| | | { |
| | | ds = webserver.GetEmployeeList(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("GetDepartmentList_Json")] |
| | | [HttpGet] |
| | | public object GetDepartmentList_Json(string Department) |
| | | { |
| | | sWhere = " Where HStopFlag=0 and HEndFlag=1"; |
| | | //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | if (Department != "") |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + Department + "%' or HName like '%" + Department + "%' ) "; |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | <%@ Application Codebehind="Global.asax.cs" Inherits="WebAPI.WebApiApplication" Language="C#" %> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Web.Http; |
| | | using System.Web.Routing; |
| | | |
| | | namespace WebAPI |
| | | { |
| | | public class WebApiApplication : System.Web.HttpApplication |
| | | { |
| | | protected void Application_Start() |
| | | { |
| | | GlobalConfiguration.Configure(WebApiConfig.Register); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <title></title> |
| | | </head> |
| | | <body> |
| | | <div>WEBAPIè¿æ¥æåï¼</div> |
| | | </body> |
| | | </html> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | using System.Runtime.Serialization.Json; |
| | | using System.IO; |
| | | using System.Text; |
| | | using WebAPI.Code; |
| | | |
| | | namespace WebAPI |
| | | { |
| | | public class ListModels |
| | | { |
| | | //public List<Test2> getMainObjectByJson2(string jsonString) |
| | | //{ |
| | | // // å®ä¾åDataContractJsonSerializer对象ï¼éè¦å¾
åºååç对象类å |
| | | // DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List<Test2>)); //ClsCg_POInStockBillMain_K3 |
| | | // //æJsonä¼ å
¥å
åæµä¸ä¿å |
| | | // jsonString = "[" + jsonString + "]"; |
| | | // // MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(jsonString)); |
| | | // using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) |
| | | // { |
| | | // object ob = serializer.ReadObject(stream); |
| | | // List<Test2> ls = (List<Test2>)ob; |
| | | // return ls; |
| | | // } |
| | | // // 使ç¨ReadObjectæ¹æ³ååºååæå¯¹è±¡ |
| | | //} |
| | | public List<Model.ClsCg_POInStockBillSub> getObjectByJson_POInStockSub(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString + "]"; |
| | | List<Model.ClsCg_POInStockBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCg_POInStockBillSub>>(jsonString); |
| | | return list; |
| | | //// å®ä¾åDataContractJsonSerializer对象ï¼éè¦å¾
åºååç对象类å |
| | | //DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List<Model.ClsCg_POInStockBillSub>)); |
| | | ////æJsonä¼ å
¥å
åæµä¸ä¿å |
| | | //jsonString = "[" + jsonString + "]"; |
| | | //using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) |
| | | //{ |
| | | // // 使ç¨ReadObjectæ¹æ³ååºååæå¯¹è±¡ |
| | | // object ob = serializer.ReadObject(stream); |
| | | // List<Model.ClsCg_POInStockBillSub> ls = (List<Model.ClsCg_POInStockBillSub>)ob; |
| | | // return ls; |
| | | //} |
| | | } |
| | | /// <summary> |
| | | /// å°jsonæ°æ®è½¬æ¢æå表å®ä½ç±» |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | //public List<Model.ClsCg_POInStockBillSub_K3> getObjectByJson(string jsonString) |
| | | //{ |
| | | // // å®ä¾åDataContractJsonSerializer对象ï¼éè¦å¾
åºååç对象类å |
| | | // DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List<Model.ClsCg_POInStockBillSub_K3>)); |
| | | // //æJsonä¼ å
¥å
åæµä¸ä¿å |
| | | // jsonString = "[" + jsonString + "]"; |
| | | // using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) |
| | | // { |
| | | // // 使ç¨ReadObjectæ¹æ³ååºååæå¯¹è±¡ |
| | | // object ob = serializer.ReadObject(stream); |
| | | // List<Model.ClsCg_POInStockBillSub_K3> ls = (List<Model.ClsCg_POInStockBillSub_K3>)ob; |
| | | // return ls; |
| | | // } |
| | | //} |
| | | public List<Model.ClsCg_POInStockBillMain> getObjectByJson_POInStockMain(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsCg_POInStockBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsCg_POInStockBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | public List<Model.ClsGy_BarCodeBill_WMS_Model> getObjectByJson_BarCode(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString + "]"; |
| | | List<Model.ClsGy_BarCodeBill_WMS_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_BarCodeBill_WMS_Model>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | public List<Model.ClsGy_MaterialList_WMS_Model> getObjectByJson_MaterialList(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString + "]"; |
| | | List<Model.ClsGy_MaterialList_WMS_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_MaterialList_WMS_Model>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | { |
| | | "$schema": "http://schemas.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", |
| | | "contentVersion": "1.0.0.0", |
| | | "parameters": { |
| | | "$system": { |
| | | "type": "Object" |
| | | } |
| | | }, |
| | | "resources": [] |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsCg_POInStockBill |
| | | { |
| | | public string HDateForWeb; |
| | | public string HAddress;// varchar(200) --交货å°ç¹ |
| | | public Int64 HSupID;// int --ä¾åºå ï¼Gy_Supplierï¼ |
| | | public Int64 HCurID;// int --å¸å« (Gy_Currency) |
| | | public Int64 HWHID;// int --ä»åº |
| | | public Single HExRate;// money --æ±ç (éæ©å®å¸å«å¸¦åº) |
| | | public Int64 HEmpID;// int --ä¸å¡å (Gy_Employee) |
| | | public Int64 HMangerID;// int --主管 (Gy_Employee) |
| | | public Int64 HDeptID;// int --é¨é¨ (Gy_Employee) |
| | | public string HExplanation;// varchar(200) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | |
| | | //public DateTime HEntryCloseDate;// datetime --è¡å
³é (é»è®¤ä¸º'') new |
| | | //public string HRemark;// varchar(200) --夿³¨ |
| | | public Int64 HMaterID;// int --ç©æID (Gy_Material) |
| | | public Int64 HUnitID;// int --计éåä½ (Gy_Unit) |
| | | public double HQty;// dec(18,8) --è¦è´§æ°é |
| | | public double HCheckQty; //æ£éªæ° |
| | | public double HPassQty; //åæ ¼æ° |
| | | public double HBadQty; //ä¸åæ ¼æ° |
| | | public double HPrice;// dec(18,8) --åå¸åä»· |
| | | public double HMoney;// dec(18,8) --åå¸éé¢ |
| | | // public Int64 HWHID;// --æ¶æä»åº |
| | | public Int64 HPOOrderInterID;// |
| | | public Int64 HPOOrderEntryID;// |
| | | public string HPOOrderBillNo;// |
| | | public DateTime HDate; //è¦è´§æ¶é´ |
| | | public Int64 HState; |
| | | public string HBackDate; |
| | | public string HBacker; |
| | | public long HBillerID; |
| | | public string HBillNo; |
| | | public int HBillStatus; |
| | | public string HBillSubType; |
| | | public string HBillType; |
| | | public string HCheckDate; |
| | | public string HChecker; |
| | | public long HCheckFlowID; |
| | | public long HCheckItemNextID; |
| | | public long HCheckItemNowID; |
| | | public string HCloseDate; |
| | | // public string HCloseMan; |
| | | public bool HCloseType; |
| | | // public DateTime HDate; |
| | | public string HDeleteDate; |
| | | public string HDeleteMan; |
| | | public string HEmpCode; |
| | | public string HMainSourceBillNo; |
| | | public string HMainSourceBillType; |
| | | public long HMainSourceEntryID; |
| | | public long HMainSourceInterID; |
| | | public string HMakeDate; |
| | | public string HMaker; |
| | | public long HPeriod; |
| | | //public string HRemark; |
| | | public string HUpDateDate; |
| | | public string HUpDater; |
| | | public long HYear; |
| | | // public string HCloseMan; |
| | | // public bool HCloseType; |
| | | public DateTime HEntryCloseDate; |
| | | public long HEntryID; |
| | | public long HInterID; |
| | | public double HRelationMoney; |
| | | public double HRelationQty; |
| | | public string HRemark; |
| | | public string HSourceBillNo; |
| | | public string HSourceBillType; |
| | | public long HSourceEntryID; |
| | | public long HSourceInterID; |
| | | |
| | | //public ClsCg_POInStockBill(); |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class JsonResult |
| | | { |
| | | public string code { get; set; } |
| | | public int count { get; set; } |
| | | public string Message { get; set; } |
| | | public object data { get; set; } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class Pensen |
| | | { |
| | | /// <summary> |
| | | ///å§å |
| | | /// </summary> |
| | | public string Name { get; set; } |
| | | /// <summary> |
| | | /// å¯ç |
| | | /// </summary> |
| | | public string Pwd { get; set; } |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class json |
| | | { |
| | | public string code { get; set; } |
| | | public int count { get; set; } |
| | | public string Message { get; set; } |
| | | public object data { get; set; } |
| | | } |
| | | } |
| New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | |
| | | // æå
³ç¨åºéç常è§ä¿¡æ¯éè¿ä¸åç¹æ§é |
| | | // æ§å¶ãæ´æ¹è¿äºç¹æ§å¼å¯ä¿®æ¹ |
| | | // ä¸ç¨åºéå
³èçä¿¡æ¯ã |
| | | [assembly: AssemblyTitle("WebAPI")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("WebAPI")] |
| | | [assembly: AssemblyCopyright("Copyright © 2019")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // å° ComVisible 设置为 false ä¼ä½¿æ¤ç¨åºéä¸çç±»å |
| | | // 对 COM ç»ä»¶ä¸å¯è§ã妿éè¦ |
| | | // ä» COM è®¿é®æ¤ç¨åºéä¸çæä¸ªç±»åï¼è¯·é对该类åå° ComVisible ç¹æ§è®¾ç½®ä¸º trueã |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 妿æ¤é¡¹ç®å COM å
¬å¼ï¼åä¸å GUID ç¨äº typelib ç ID |
| | | [assembly: Guid("2b2ffe83-a979-4aab-9742-c94617729812")] |
| | | |
| | | // ç¨åºéççæ¬ä¿¡æ¯ç±ä¸åå个å¼ç»æ: |
| | | // |
| | | // ä¸»çæ¬ |
| | | // æ¬¡çæ¬ |
| | | // å
é¨çæ¬å· |
| | | // ä¿®è®¢çæ¬ |
| | | // |
| | | // å¯ä»¥æå®ææå¼ï¼ä¹å¯ä»¥ä½¿ç¨â修订å·âåâå
é¨çæ¬å·âçé»è®¤å¼ï¼ |
| | | // æ¹æ³æ¯æå¦ä¸æç¤ºä½¿ç¨ "*": |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | |
| | | <!-- æå
³ä½¿ç¨ web.config 转æ¢ç详ç»ä¿¡æ¯ï¼è¯·è®¿é® http://go.microsoft.com/fwlink/?LinkId=125889 --> |
| | | |
| | | <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
| | | <!-- |
| | | å¨ä¸ä¾ä¸ï¼âSetAttributesâ转æ¢å°æ´æ¹ |
| | | âconnectionStringâçå¼ï¼ä»¥ä»
å¨âMatchâå®ä½å¨ |
| | | æ¾å°å¼ä¸ºâMyDBâçç¹æ§ânameâæ¶ä½¿ç¨âReleaseSQLServerâã |
| | | |
| | | <connectionStrings> |
| | | <add name="MyDB" |
| | | connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" |
| | | xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> |
| | | </connectionStrings> |
| | | --> |
| | | <system.web> |
| | | <!-- |
| | | |
| | | å¨ä¸ä¾ä¸ï¼âReplaceâ转æ¢å°æ¿æ¢ |
| | | web.config æä»¶çæ´ä¸ª <customErrors> èã |
| | | 请注æï¼ç±äº |
| | | å¨ <system.web> èç¹ä¸ä»
æä¸ä¸ª customErrors èï¼å æ¤ä¸éè¦ä½¿ç¨âxdt:Locatorâç¹æ§ã |
| | | |
| | | <customErrors defaultRedirect="GenericError.htm" |
| | | mode="RemoteOnly" xdt:Transform="Replace"> |
| | | <error statusCode="500" redirect="InternalError.htm"/> |
| | | </customErrors> |
| | | --> |
| | | </system.web> |
| | | </configuration> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | |
| | | <!-- æå
³ä½¿ç¨ web.config 转æ¢ç详ç»ä¿¡æ¯ï¼è¯·è®¿é® http://go.microsoft.com/fwlink/?LinkId=125889 --> |
| | | |
| | | <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
| | | <!-- |
| | | å¨ä¸ä¾ä¸ï¼âSetAttributesâ转æ¢å°æ´æ¹ |
| | | âconnectionStringâçå¼ï¼ä»¥ä»
å¨âMatchâå®ä½å¨ |
| | | æ¾å°å¼ä¸ºâMyDBâçç¹æ§ânameâæ¶ä½¿ç¨âReleaseSQLServerâã |
| | | |
| | | <connectionStrings> |
| | | <add name="MyDB" |
| | | connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" |
| | | xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> |
| | | </connectionStrings> |
| | | --> |
| | | <system.web> |
| | | <compilation xdt:Transform="RemoveAttributes(debug)" /> |
| | | <!-- |
| | | |
| | | å¨ä¸ä¾ä¸ï¼âReplaceâ转æ¢å°æ¿æ¢ |
| | | web.config æä»¶çæ´ä¸ª <customErrors> èã |
| | | 请注æï¼ç±äº |
| | | å¨ <system.web> èç¹ä¸ä»
æä¸ä¸ª customErrors èï¼å æ¤ä¸éè¦ä½¿ç¨âxdt:Locatorâç¹æ§ã |
| | | |
| | | <customErrors defaultRedirect="GenericError.htm" |
| | | mode="RemoteOnly" xdt:Transform="Replace"> |
| | | <error statusCode="500" redirect="InternalError.htm"/> |
| | | </customErrors> |
| | | --> |
| | | </system.web> |
| | | </configuration> |
| New file |
| | |
| | | <?xml version="1.0"?> |
| | | <!-- |
| | | æå
³å¦ä½é
ç½® ASP.NET åºç¨ç¨åºç详ç»ä¿¡æ¯ï¼è¯·è®¿é® |
| | | http://go.microsoft.com/fwlink/?LinkId=301879 |
| | | --> |
| | | <configuration> |
| | | <appSettings/> |
| | | <!-- |
| | | æå
³ web.config æ´æ¹ç说æï¼è¯·åè§ http://go.microsoft.com/fwlink/?LinkId=235367ã |
| | | |
| | | å¯å¨ <httpRuntime> æ è®°ä¸è®¾ç½®ä»¥ä¸ç¹æ§ã |
| | | <system.Web> |
| | | <httpRuntime targetFramework="4.5" /> |
| | | </system.Web> |
| | | --> |
| | | <system.web> |
| | | <compilation debug="true" targetFramework="4.5"/> |
| | | <httpRuntime/> |
| | | <pages controlRenderingCompatibilityVersion="4.0"/> |
| | | </system.web> |
| | | <system.webServer> |
| | | <handlers> |
| | | <remove name="ExtensionlessUrlHandler-Integrated-4.0"/> |
| | | <!--<remove name="OPTIONSVerbHandler"/>--> |
| | | <remove name="TRACEVerbHandler"/> |
| | | <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/> |
| | | </handlers> |
| | | </system.webServer> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/> |
| | | <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/> |
| | | <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0"/> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/> |
| | | <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/> |
| | | <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/> |
| | | <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0"/> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/> |
| | | <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | </configuration> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProductVersion> |
| | | </ProductVersion> |
| | | <SchemaVersion>2.0</SchemaVersion> |
| | | <ProjectGuid>{5B60CE0C-963C-4DC2-91B3-0B471AAC5438}</ProjectGuid> |
| | | <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>WebAPI</RootNamespace> |
| | | <AssemblyName>WebAPI</AssemblyName> |
| | | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| | | <UseIISExpress>false</UseIISExpress> |
| | | <IISExpressSSLPort /> |
| | | <IISExpressAnonymousAuthentication /> |
| | | <IISExpressWindowsAuthentication /> |
| | | <IISExpressUseClassicPipelineMode /> |
| | | <TargetFrameworkProfile /> |
| | | <Use64BitIISExpress /> |
| | | <UseGlobalApplicationHostFile /> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <Prefer32Bit>false</Prefer32Bit> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>pdbonly</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <Prefer32Bit>false</Prefer32Bit> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="BLL, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>E:\éç§\项ç®\èªä¸»ä¾åºåå¹³å°\ä¾åºåååå¹³å°\DLL\BLL.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="DAL, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\DAL.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="DBUtility, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>E:\éç§\项ç®\èªä¸»ä¾åºåå¹³å°\ä¾åºåååå¹³å°\DLL\DBUtility.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WebApi.Client, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\Kingdee.BOS.WebApi.Client.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WebApi.FormService, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\Kingdee.BOS.WebApi.FormService.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WebApi.ServicesStub, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\Kingdee.BOS.WebApi.ServicesStub.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Microsoft.Azure.AppService.ApiApps.Service, Version=0.9.16.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <HintPath>..\packages\Microsoft.Azure.AppService.ApiApps.Service.0.9.16\lib\net45\Microsoft.Azure.AppService.ApiApps.Service.dll</HintPath> |
| | | <Private>True</Private> |
| | | </Reference> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath> |
| | | <Private>True</Private> |
| | | </Reference> |
| | | <Reference Include="Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\Model.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\..\WeChat Files\shenjie1112005\FileStorage\File\2019-12\webapiæ¥å£\FurjaFlatFormAPI\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Pub_Class, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>E:\éç§\项ç®\èªä¸»ä¾åºåå¹³å°\ä¾åºåååå¹³å°\DLL\Pub_Class.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Pub_Control, Version=1.0.6632.19241, Culture=neutral, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>E:\éç§\项ç®\èªä¸»ä¾åºåå¹³å°\ä¾åºåååå¹³å°\DLL\Pub_Control.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="SQLHelper, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>E:\éç§\项ç®\èªä¸»ä¾åºåå¹³å°\ä¾åºåååå¹³å°\DLL\SQLHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Swashbuckle.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd1bb07a5ac7c7bc, processorArchitecture=MSIL"> |
| | | <HintPath>..\packages\Swashbuckle.Core.5.0.0\lib\net40\Swashbuckle.Core.dll</HintPath> |
| | | <Private>True</Private> |
| | | </Reference> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="System.IdentityModel.Tokens.Jwt, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <HintPath>..\packages\System.IdentityModel.Tokens.Jwt.4.0.0\lib\net45\System.IdentityModel.Tokens.Jwt.dll</HintPath> |
| | | <Private>True</Private> |
| | | </Reference> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\System.Net.Http.Formatting.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Runtime.Serialization" /> |
| | | <Reference Include="System.Web.DynamicData" /> |
| | | <Reference Include="System.Web.Entity" /> |
| | | <Reference Include="System.Web.ApplicationServices" /> |
| | | <Reference Include="System.ComponentModel.DataAnnotations" /> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Drawing" /> |
| | | <Reference Include="System.Web" /> |
| | | <Reference Include="System.Web.Extensions" /> |
| | | <Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\System.Web.Http.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>DLL\System.Web.Http.WebHost.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Xml" /> |
| | | <Reference Include="System.Configuration" /> |
| | | <Reference Include="System.Web.Services" /> |
| | | <Reference Include="System.EnterpriseServices" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="WebActivatorEx, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL"> |
| | | <HintPath>..\packages\WebActivatorEx.2.0.6\lib\net40\WebActivatorEx.dll</HintPath> |
| | | <Private>True</Private> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Content Include="DLL\BLL.dll" /> |
| | | <Content Include="DLL\DAL.dll" /> |
| | | <Content Include="DLL\DBUtility.dll" /> |
| | | <Content Include="DLL\Kingdee.BOS.WebApi.Client.dll" /> |
| | | <Content Include="DLL\Kingdee.BOS.WebApi.FormService.dll" /> |
| | | <Content Include="DLL\Kingdee.BOS.WebApi.ServicesStub.dll" /> |
| | | <Content Include="DLL\Model.dll" /> |
| | | <Content Include="DLL\Newtonsoft.Json.Net35.dll" /> |
| | | <Content Include="DLL\Pub_Class.dll" /> |
| | | <Content Include="DLL\Pub_Control.dll" /> |
| | | <Content Include="DLL\SQLHelper.dll" /> |
| | | <Content Include="Global.asax" /> |
| | | <Content Include="Index.html" /> |
| | | <Content Include="Web.config"> |
| | | <SubType>Designer</SubType> |
| | | </Content> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="App_Start\SwaggerConfig.cs" /> |
| | | <Compile Include="App_Start\WebApiConfig.cs" /> |
| | | <Compile Include="BLL\WebServer.cs" /> |
| | | <Compile Include="Code\Common.cs" /> |
| | | <Compile Include="Code\Test2.cs" /> |
| | | <Compile Include="Code\TestDAL.cs" /> |
| | | <Compile Include="Controllers\BarCodeController.cs" /> |
| | | <Compile Include="Controllers\POInStockBackController.cs" /> |
| | | <Compile Include="Controllers\POInStockController.cs" /> |
| | | <Compile Include="Controllers\PODemandPlanController.cs" /> |
| | | <Compile Include="Controllers\EntrustOrderController.cs" /> |
| | | <Compile Include="Controllers\POOrderController.cs" /> |
| | | <Compile Include="Controllers\ReportController.cs" /> |
| | | <Compile Include="ListModels.cs" /> |
| | | <Compile Include="Models\ClsCg_POInStockBill.cs" /> |
| | | <Compile Include="Models\json.cs" /> |
| | | <Compile Include="Controllers\WebAPIController.cs" /> |
| | | <Compile Include="Global.asax.cs"> |
| | | <DependentUpon>Global.asax</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Models\JsonResult.cs" /> |
| | | <Compile Include="Models\Pensen.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Content Include="packages.config" /> |
| | | <Content Include="Metadata\deploymentTemplates\apiappconfig.azureresource.json" /> |
| | | <Content Include="apiapp.json" /> |
| | | <None Include="Properties\PublishProfiles\WEBAPI.pubxml" /> |
| | | <None Include="Properties\PublishProfiles\WEBAPIConfig.pubxml" /> |
| | | <None Include="Web.Debug.config"> |
| | | <DependentUpon>Web.config</DependentUpon> |
| | | </None> |
| | | <None Include="Web.Release.config"> |
| | | <DependentUpon>Web.config</DependentUpon> |
| | | </None> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Folder Include="App_Data\" /> |
| | | </ItemGroup> |
| | | <PropertyGroup> |
| | | <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> |
| | | <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <OutputPath>bin\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <DebugType>full</DebugType> |
| | | <PlatformTarget>x86</PlatformTarget> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> |
| | | <OutputPath>bin\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <Optimize>true</Optimize> |
| | | <DebugType>pdbonly</DebugType> |
| | | <PlatformTarget>x86</PlatformTarget> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
| | | </PropertyGroup> |
| | | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
| | | <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> |
| | | <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> |
| | | <ProjectExtensions> |
| | | <VisualStudio> |
| | | <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> |
| | | <WebProjectProperties> |
| | | <UseIIS>False</UseIIS> |
| | | <AutoAssignPort>True</AutoAssignPort> |
| | | <DevelopmentServerPort>12761</DevelopmentServerPort> |
| | | <DevelopmentServerVPath>/</DevelopmentServerVPath> |
| | | <IISUrl>http://localhost/WebAPI</IISUrl> |
| | | <NTLMAuthentication>False</NTLMAuthentication> |
| | | <UseCustomServer>False</UseCustomServer> |
| | | <CustomServerUrl> |
| | | </CustomServerUrl> |
| | | <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> |
| | | </WebProjectProperties> |
| | | </FlavorProperties> |
| | | </VisualStudio> |
| | | </ProjectExtensions> |
| | | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
| | | Other similar extension points exist, see Microsoft.Common.targets. |
| | | <Target Name="BeforeBuild"> |
| | | </Target> |
| | | <Target Name="AfterBuild"> |
| | | </Target> |
| | | --> |
| | | </Project> |
| New file |
| | |
| | | { |
| | | "$schema": "http://json-schema.org/schemas/2014-11-01/apiapp.json#", |
| | | "id": "WebAPI", |
| | | "namespace": "microsoft.com", |
| | | "gateway": "2015-01-14", |
| | | "version": "1.0.0", |
| | | "title": "WebAPI", |
| | | "summary": "", |
| | | "author": "", |
| | | "endpoints": { |
| | | "apiDefinition": "/swagger/docs/v1", |
| | | "status": null |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" /> |
| | | <package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" /> |
| | | <package id="Microsoft.AspNet.WebApi.Client.zh-Hans" version="5.2.3" targetFramework="net45" /> |
| | | <package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" /> |
| | | <package id="Microsoft.AspNet.WebApi.Core.zh-Hans" version="5.2.3" targetFramework="net45" /> |
| | | <package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.3" targetFramework="net45" /> |
| | | <package id="Microsoft.AspNet.WebApi.WebHost.zh-Hans" version="5.2.3" targetFramework="net45" /> |
| | | <package id="Microsoft.Azure.AppService.ApiApps.Service" version="0.9.16" targetFramework="net45" /> |
| | | <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /> |
| | | <package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" /> |
| | | <package id="Swashbuckle" version="5.0.0" targetFramework="net45" /> |
| | | <package id="Swashbuckle.Core" version="5.0.0" targetFramework="net45" /> |
| | | <package id="System.IdentityModel.Tokens.Jwt" version="4.0.0" targetFramework="net45" /> |
| | | <package id="WebActivatorEx" version="2.0.6" targetFramework="net45" /> |
| | | </packages> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <startup> |
| | | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/> |
| | | </startup> |
| | | </configuration> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace WindowsFormsApp1 |
| | | { |
| | | static class Program |
| | | { |
| | | /// <summary> |
| | | /// åºç¨ç¨åºç主å
¥å£ç¹ã |
| | | /// </summary> |
| | | [STAThread] |
| | | static void Main() |
| | | { |
| | | Application.EnableVisualStyles(); |
| | | Application.SetCompatibleTextRenderingDefault(false); |
| | | Application.Run(new TestAPI()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | |
| | | // æå
³ç¨åºéçä¸è¬ä¿¡æ¯ç±ä»¥ä¸ |
| | | // æ§å¶ãæ´æ¹è¿äºç¹æ§å¼å¯ä¿®æ¹ |
| | | // ä¸ç¨åºéå
³èçä¿¡æ¯ã |
| | | [assembly: AssemblyTitle("WindowsFormsApp1")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("WindowsFormsApp1")] |
| | | [assembly: AssemblyCopyright("Copyright © 2019")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // å° ComVisible 设置为 false ä¼ä½¿æ¤ç¨åºéä¸çç±»å |
| | | //对 COM ç»ä»¶ä¸å¯è§ã妿éè¦ä» COM è®¿é®æ¤ç¨åºéä¸çç±»å |
| | | //è¯·å°æ¤ç±»åç ComVisible ç¹æ§è®¾ç½®ä¸º trueã |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 妿æ¤é¡¹ç®å COM å
¬å¼ï¼åä¸å GUID ç¨äºç±»ååºç ID |
| | | [assembly: Guid("ffed17b5-612d-404c-a9b8-628ba6dc3257")] |
| | | |
| | | // ç¨åºéççæ¬ä¿¡æ¯ç±ä¸åå个å¼ç»æ: |
| | | // |
| | | // ä¸»çæ¬ |
| | | // æ¬¡çæ¬ |
| | | // çæå· |
| | | // ä¿®è®¢å· |
| | | // |
| | | //å¯ä»¥æå®ææè¿äºå¼ï¼ä¹å¯ä»¥ä½¿ç¨âçæå·âåâ修订å·âçé»è®¤å¼ |
| | | //éè¿ä½¿ç¨ "*"ï¼å¦ä¸æç¤º: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <auto-generated> |
| | | // æ¤ä»£ç ç±å·¥å
·çæã |
| | | // è¿è¡æ¶çæ¬:4.0.30319.42000 |
| | | // |
| | | // å¯¹æ¤æä»¶çæ´æ¹å¯è½ä¼å¯¼è´ä¸æ£ç¡®çè¡ä¸ºï¼å¹¶ä¸å¦æ |
| | | // éæ°çæä»£ç ï¼è¿äºæ´æ¹å°ä¼ä¸¢å¤±ã |
| | | // </auto-generated> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace WindowsFormsApp1.Properties { |
| | | using System; |
| | | |
| | | |
| | | /// <summary> |
| | | /// ä¸ä¸ªå¼ºç±»åçèµæºç±»ï¼ç¨äºæ¥æ¾æ¬å°åçå符串çã |
| | | /// </summary> |
| | | // æ¤ç±»æ¯ç± StronglyTypedResourceBuilder |
| | | // ç±»éè¿ç±»ä¼¼äº ResGen æ Visual Studio çå·¥å
·èªå¨çæçã |
| | | // è¥è¦æ·»å æç§»é¤æåï¼è¯·ç¼è¾ .ResX æä»¶ï¼ç¶åéæ°è¿è¡ ResGen |
| | | // (以 /str ä½ä¸ºå½ä»¤é项)ï¼æéæ°çæ VS 项ç®ã |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] |
| | | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| | | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
| | | internal class Resources { |
| | | |
| | | private static global::System.Resources.ResourceManager resourceMan; |
| | | |
| | | private static global::System.Globalization.CultureInfo resourceCulture; |
| | | |
| | | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] |
| | | internal Resources() { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¿åæ¤ç±»ä½¿ç¨çç¼åç ResourceManager å®ä¾ã |
| | | /// </summary> |
| | | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
| | | internal static global::System.Resources.ResourceManager ResourceManager { |
| | | get { |
| | | if (object.ReferenceEquals(resourceMan, null)) { |
| | | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApp1.Properties.Resources", typeof(Resources).Assembly); |
| | | resourceMan = temp; |
| | | } |
| | | return resourceMan; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä½¿ç¨æ¤å¼ºç±»åèµæºç±»ï¼ä¸ºææèµæºæ¥æ¾ |
| | | /// éåå½å线ç¨ç CurrentUICulture 屿§ã |
| | | /// </summary> |
| | | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] |
| | | internal static global::System.Globalization.CultureInfo Culture { |
| | | get { |
| | | return resourceCulture; |
| | | } |
| | | set { |
| | | resourceCulture = value; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | </root> |
| New file |
| | |
| | | //------------------------------------------------------------------------------ |
| | | // <auto-generated> |
| | | // æ¤ä»£ç ç±å·¥å
·çæã |
| | | // è¿è¡æ¶çæ¬:4.0.30319.42000 |
| | | // |
| | | // å¯¹æ¤æä»¶çæ´æ¹å¯è½ä¼å¯¼è´ä¸æ£ç¡®çè¡ä¸ºï¼å¹¶ä¸å¦æ |
| | | // éæ°çæä»£ç ï¼è¿äºæ´æ¹å°ä¼ä¸¢å¤±ã |
| | | // </auto-generated> |
| | | //------------------------------------------------------------------------------ |
| | | |
| | | namespace WindowsFormsApp1.Properties { |
| | | |
| | | |
| | | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] |
| | | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] |
| | | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { |
| | | |
| | | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); |
| | | |
| | | public static Settings Default { |
| | | get { |
| | | return defaultInstance; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version='1.0' encoding='utf-8'?> |
| | | <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> |
| | | <Profiles> |
| | | <Profile Name="(Default)" /> |
| | | </Profiles> |
| | | <Settings /> |
| | | </SettingsFile> |
| New file |
| | |
| | | namespace WindowsFormsApp1 |
| | | { |
| | | partial class TestAPI |
| | | { |
| | | /// <summary> |
| | | /// å¿
éç设计å¨åéã |
| | | /// </summary> |
| | | private System.ComponentModel.IContainer components = null; |
| | | |
| | | /// <summary> |
| | | /// æ¸
çæææ£å¨ä½¿ç¨çèµæºã |
| | | /// </summary> |
| | | /// <param name="disposing">妿åºéæ¾æç®¡èµæºï¼ä¸º trueï¼å¦å为 falseã</param> |
| | | protected override void Dispose(bool disposing) |
| | | { |
| | | if (disposing && (components != null)) |
| | | { |
| | | components.Dispose(); |
| | | } |
| | | base.Dispose(disposing); |
| | | } |
| | | |
| | | #region Windows çªä½è®¾è®¡å¨çæç代ç |
| | | |
| | | /// <summary> |
| | | /// è®¾è®¡å¨æ¯ææéçæ¹æ³ - ä¸è¦ä¿®æ¹ |
| | | /// 使ç¨ä»£ç ç¼è¾å¨ä¿®æ¹æ¤æ¹æ³çå
容ã |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | this.btnCS = new System.Windows.Forms.Button(); |
| | | this.txtTest = new System.Windows.Forms.TextBox(); |
| | | this.SuspendLayout(); |
| | | // |
| | | // btnCS |
| | | // |
| | | this.btnCS.Location = new System.Drawing.Point(365, 122); |
| | | this.btnCS.Name = "btnCS"; |
| | | this.btnCS.Size = new System.Drawing.Size(75, 23); |
| | | this.btnCS.TabIndex = 0; |
| | | this.btnCS.Text = "æµè¯"; |
| | | this.btnCS.UseVisualStyleBackColor = true; |
| | | this.btnCS.Click += new System.EventHandler(this.btnCS_Click); |
| | | // |
| | | // txtTest |
| | | // |
| | | this.txtTest.Font = new System.Drawing.Font("å®ä½", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
| | | this.txtTest.Location = new System.Drawing.Point(225, 55); |
| | | this.txtTest.Multiline = true; |
| | | this.txtTest.Name = "txtTest"; |
| | | this.txtTest.Size = new System.Drawing.Size(380, 51); |
| | | this.txtTest.TabIndex = 1; |
| | | // |
| | | // TestAPI |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.ClientSize = new System.Drawing.Size(800, 450); |
| | | this.Controls.Add(this.txtTest); |
| | | this.Controls.Add(this.btnCS); |
| | | this.Name = "TestAPI"; |
| | | this.Text = "æµè¯"; |
| | | this.ResumeLayout(false); |
| | | this.PerformLayout(); |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | private System.Windows.Forms.Button btnCS; |
| | | private System.Windows.Forms.TextBox txtTest; |
| | | } |
| | | } |
| | | |
| New file |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using WebAPI; |
| | | using WebAPI.Code; |
| | | using WebAPI.Controllers; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WindowsFormsApp1 |
| | | { |
| | | public partial class TestAPI : Form |
| | | { |
| | | public TestAPI() |
| | | { |
| | | InitializeComponent(); |
| | | } |
| | | private JsonResult objJsonResult = new JsonResult(); |
| | | public static string GetSession(string sMsg) |
| | | { |
| | | try |
| | | { |
| | | string s = Common.GetSession(); |
| | | return s; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | return ""; |
| | | } |
| | | } |
| | | private void btnCS_Click(object sender, EventArgs e) |
| | | { |
| | | // // string a=string.Format("); |
| | | // PayRollController web = new PayRollController(); |
| | | // //WebAPIController web2=new WebAPIController(); |
| | | // //string Json="{\"HState\":\"æªç¡®è®¤\",\"hmainid\":29,\"hdate\":\"2019-12-20\",\"hjhdate\":\"2019-12-20\",\"hbillno\":\"CGYH000000000072\",\"hbilltype\":\"1114\",\"hsupid\":2214,\"supHNumber\":\"01.001\",\"supHName\":\"æ´å°ï¼ä¸å½ï¼æéå
¬å¸\",\"hcurid\":0,\"curhnumber\":\"*\",\"curhname\":\"*\",\"hexrate\":0,\"HMTONO\":\"\",\"HEmpID\":0,\"hywnumber\":null,\"hywname\":null,\"hmanagerid\":0,\"hmanagerNumber\":null,\"hmanagerName\":null,\"HDeptID\":0,\"HDepNumber\":null,\"HDepName\":null,\"hexplanation\":\"\",\"hremark\":\"\",\"hinnerbillno\":\"\",\"hmaker\":\"admin\",\"hmakedate\":\"2019-12-20\",\"hchecker\":\"admin\",\"hcheckdate\":\"2019-12-20\",\"hupdater\":\"\",\"hupdatedate\":null,\"hcloseman\":\"\",\"hclosedate\":null,\"hdeleteman\":\"\",\"hdeletedate\":null,\"hsubid\":1,\"hmaterid\":178070,\"hmaterNumber\":\"CS0001\",\"hmaterName\":\"塿ABS\",\"hmaterModel\":\"é»è²éº»é¢éç®\",\"hunitid\":2635,\"hunitNumber\":\"03\",\"hunitName\":\"kg\",\"HQty\":300,\"hprice\":0,\"hmoney\":0,\"HTaxPrice\":0,\"hEcloseman\":\"\",\"hclosetype\":false,\"hEremark\":\"\",\"HSourceInterID\":230087,\"HSourceEntryID\":1,\"HSourceBillNo\":\"POORD177806\",\"HSourceBillType\":\"71\",\"HPOOrderInterID\":230087,\"HPOOrderEntryID\":1,\"HPOOrderBillNo\":\"POORD177806\",\"sumQty\":0,\"HWsumQty\":300}"; |
| | | // //JObject job = JObject.Parse(Json); |
| | | //// string json = "[{\"HInterID\":0,\"HEntryID\":0,\"HSourceInterID\":2213,\"HDate\":\"2017-12-12\",\"HSourceEntryID\":5,\"HRemark\":\"æèæºHLT4027(56003871)\",\"HSourceBillNo\":\"NBA222\",\"SourceBillType\":\"\",\"HQty\":0,\"HPrice\":20,\"HMoney\":30,\"HPOOrderBillNo\":\"JJJJJ\"}]"; |
| | | // string json = "{\"HBillNo\":\"DD180730\",\"HDate\":\"2019-11-22T00:00:00\",\"HManagerName\":\"\",\"HManagerID\":\"0\",\"HSupName\":\"\",\"HSupID\":\"1034\",\"HRemark\":\"\",\"HEmpName\":\"\",\"HEmpID\":\"0\",\"HMakerDate\":\"\",\"HMaker\":\"æ¯æ æ \",\"HCheckDate\":\"2019-11-22T14:06:57\",\"HChecker\":\"æ¯æ æ \",\"HInterID\":\"55\"}"; |
| | | //// SaverPOInStock(json,json);//GetPOInStockShowBillSub |
| | | // SaverPOInStock(json); |
| | | // web2.GetPOInStockShowBillSub("28", "28,5;"); |
| | | //if (job["hbillno"].ToString() == "CGYH000000000072") |
| | | //{ |
| | | // MessageBox.Show(job["hbillno"].ToString()); |
| | | //} |
| | | //MessageBox.Show("没åå°ï¼"); |
| | | // web.GetUser(Convert.ToInt64(txtTest.Text)); |
| | | // web.GetUser(); |
| | | } |
| | | public object SaverPOInStock(string msg) |
| | | { |
| | | //var _value = msg["msg"].ToString(); |
| | | //string msg1 = _value.ToString(); |
| | | //string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | //string msg2 = sArray[0].ToString(); |
| | | //string msg3 = sArray[1].ToString(); |
| | | //HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"];//è·åä¼ ç»context |
| | | //HttpRequestBase request = context.Request;//å®ä¹ä¼ ç»request对象 |
| | | //string callback = request.Form["callback"]; |
| | | |
| | | //using (StreamWriter sw = new StreamWriter(@"D:\log.txt")) |
| | | //{ |
| | | // sw.Write("callback:" + callback); |
| | | //} |
| | | |
| | | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | DAL.ClsCg_POInStockBill oBill = new DAL.ClsCg_POInStockBill(); |
| | | // TestDAL oBill = new TestDAL(); |
| | | List<Model.ClsCg_POInStockBillMain> lsmain = new List<Model.ClsCg_POInStockBillMain>(); |
| | | //msg2 = msg2.Substring(1, msg2.Length - 2); |
| | | msg = msg.Replace("\\", ""); |
| | | msg = msg.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_POInStockMain(msg); |
| | | foreach (Model.ClsCg_POInStockBillMain oItem in lsmain) |
| | | { |
| | | oItem.HMaker = GetSession(""); |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HCurID = 1; |
| | | oItem.HMainSourceInterID = oItem.HInterID; |
| | | oItem.HInterID = DBUtility.ClsPub.CreateBillID("1103", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oBill.omodel = oItem; |
| | | } |
| | | // msg2= "[{\"HMaterID\":70952,\"HMaterNumber\":\"3.02.DT127.006\",\"HMaterName\":\"ç½æ¿é¢æ¿\",\"HMaterModel\":\"é»è²éº»é¢éç® 412 * 412 * 0.21mm 1åº1 468U00 - 04\n\",\"HUnitID\":249,\"HUnitName\":\"PCS\",\"HQty\":2268,\"HPrice\":0,\"HMoney\":0,\"HDate\":\"2019 / 12 / 18 0:00:00\",\"HDate2\":\"2019 / 12 / 20 8:30:22\",\"HSourceInterID\":819,\"HSourceEntryID\":4,\"HSourceBillNo\":\"CGPG000000000973\",\"HSourceBillType\":\"1114\",\"HPOOrderBillNo\":\"POORD047421\",\"HPOOrderInterID\":49365,\"HPOOrderEntryID\":5,\"HMTONO\":\"G19 - 339 - 05\"}]"; |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | // msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | //msg3 = msg3.Replace("\\", ""); |
| | | //msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Model.ClsCg_POInStockBillSub> ls = new List<Model.ClsCg_POInStockBillSub>(); |
| | | ls = oListModels.getObjectByJson_POInStockSub(msg); |
| | | int i = 1; |
| | | foreach (Model.ClsCg_POInStockBillSub oItemSub in ls) |
| | | { |
| | | oItemSub.HEntryID = i; |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; |
| | | oBill.DetailColl.Add(oItemSub); |
| | | i++; |
| | | } |
| | | //ä¿åå夿(åæ®å·éå¤ï¼ç¬å½é¡¹ç®) |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID != 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectGuid>{FFED17B5-612D-404C-A9B8-628BA6DC3257}</ProjectGuid> |
| | | <OutputType>WinExe</OutputType> |
| | | <RootNamespace>WindowsFormsApp1</RootNamespace> |
| | | <AssemblyName>WindowsFormsApp1</AssemblyName> |
| | | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> |
| | | <Deterministic>true</Deterministic> |
| | | <TargetFrameworkProfile /> |
| | | <PublishUrl>åå¸\</PublishUrl> |
| | | <Install>true</Install> |
| | | <InstallFrom>Disk</InstallFrom> |
| | | <UpdateEnabled>false</UpdateEnabled> |
| | | <UpdateMode>Foreground</UpdateMode> |
| | | <UpdateInterval>7</UpdateInterval> |
| | | <UpdateIntervalUnits>Days</UpdateIntervalUnits> |
| | | <UpdatePeriodically>false</UpdatePeriodically> |
| | | <UpdateRequired>false</UpdateRequired> |
| | | <MapFileExtensions>true</MapFileExtensions> |
| | | <ApplicationRevision>0</ApplicationRevision> |
| | | <ApplicationVersion>1.0.0.%2a</ApplicationVersion> |
| | | <IsWebBootstrapper>false</IsWebBootstrapper> |
| | | <UseApplicationTrust>false</UseApplicationTrust> |
| | | <BootstrapperEnabled>true</BootstrapperEnabled> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <PlatformTarget>AnyCPU</PlatformTarget> |
| | | <DebugType>pdbonly</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <OutputPath>bin\x86\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <DebugType>full</DebugType> |
| | | <PlatformTarget>x86</PlatformTarget> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
| | | <Prefer32Bit>true</Prefer32Bit> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> |
| | | <OutputPath>bin\x86\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <Optimize>true</Optimize> |
| | | <DebugType>pdbonly</DebugType> |
| | | <PlatformTarget>x86</PlatformTarget> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
| | | <Prefer32Bit>true</Prefer32Bit> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="BLL"> |
| | | <HintPath>..\WebAPI\DLL\BLL.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="DAL"> |
| | | <HintPath>..\WebAPI\DLL\DAL.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="DBUtility"> |
| | | <HintPath>..\WebAPI\DLL\DBUtility.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Model"> |
| | | <HintPath>..\WebAPI\DLL\Model.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\..\WeChat Files\shenjie1112005\FileStorage\File\2019-12\webapiæ¥å£\FurjaFlatFormAPI\packages\Newtonsoft.Json.5.0.6\lib\net45\Newtonsoft.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Newtonsoft.Json.Net35"> |
| | | <HintPath>..\WebAPI\DLL\Newtonsoft.Json.Net35.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Pub_Class"> |
| | | <HintPath>..\WebAPI\DLL\Pub_Class.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Pub_Control"> |
| | | <HintPath>..\WebAPI\DLL\Pub_Control.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\WebAPI\DLL\System.Net.Http.Formatting.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Web" /> |
| | | <Reference Include="System.Web.Abstractions" /> |
| | | <Reference Include="System.Web.Extensions" /> |
| | | <Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\..\WeChat Files\shenjie1112005\FileStorage\File\2019-12\webapiæ¥å£\FurjaFlatFormAPI\packages\Microsoft.AspNet.WebApi.Core.5.0.0\lib\net45\System.Web.Http.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>bin\Debug\System.Web.Http.WebHost.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Deployment" /> |
| | | <Reference Include="System.Drawing" /> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Windows.Forms" /> |
| | | <Reference Include="System.Xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="TestAPI.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Include="TestAPI.Designer.cs"> |
| | | <DependentUpon>TestAPI.cs</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="Program.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | <EmbeddedResource Include="Properties\Resources.resx"> |
| | | <Generator>ResXFileCodeGenerator</Generator> |
| | | <LastGenOutput>Resources.Designer.cs</LastGenOutput> |
| | | <SubType>Designer</SubType> |
| | | </EmbeddedResource> |
| | | <Compile Include="Properties\Resources.Designer.cs"> |
| | | <AutoGen>True</AutoGen> |
| | | <DependentUpon>Resources.resx</DependentUpon> |
| | | <DesignTime>True</DesignTime> |
| | | </Compile> |
| | | <EmbeddedResource Include="TestAPI.resx"> |
| | | <DependentUpon>TestAPI.cs</DependentUpon> |
| | | </EmbeddedResource> |
| | | <None Include="Properties\Settings.settings"> |
| | | <Generator>SettingsSingleFileGenerator</Generator> |
| | | <LastGenOutput>Settings.Designer.cs</LastGenOutput> |
| | | </None> |
| | | <Compile Include="Properties\Settings.Designer.cs"> |
| | | <AutoGen>True</AutoGen> |
| | | <DependentUpon>Settings.settings</DependentUpon> |
| | | <DesignTimeSharedInput>True</DesignTimeSharedInput> |
| | | </Compile> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="App.config"> |
| | | <SubType>Designer</SubType> |
| | | </None> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WebAPI\WebAPI.csproj"> |
| | | <Project>{5b60ce0c-963c-4dc2-91b3-0b471aac5438}</Project> |
| | | <Name>WebAPI</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <BootstrapperPackage Include=".NETFramework,Version=v4.5"> |
| | | <Visible>False</Visible> |
| | | <ProductName>Microsoft .NET Framework 4.5 %28x86 å x64%29</ProductName> |
| | | <Install>true</Install> |
| | | </BootstrapperPackage> |
| | | <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> |
| | | <Visible>False</Visible> |
| | | <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> |
| | | <Install>false</Install> |
| | | </BootstrapperPackage> |
| | | <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> |
| | | <Visible>False</Visible> |
| | | <ProductName>.NET Framework 3.5 SP1</ProductName> |
| | | <Install>false</Install> |
| | | </BootstrapperPackage> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
| New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | </root> |
| New file |
| | |
| | | USEIIS æ¹ä¸ºFALSE |
| New file |
| | |
| | | Object Report |
| | | Version='6.0.0.6' |
| | | Title='ä½ çæ¥è¡¨æ é¢' |
| | | PrintAsDesignPaper=F |
| | | Object Font |
| | | Name='å®ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | Object Printer |
| | | Size=256 |
| | | Width=8 |
| | | Height=6 |
| | | LeftMargin=0 |
| | | TopMargin=0 |
| | | RightMargin=0 |
| | | BottomMargin=0 |
| | | End |
| | | Object DetailGrid |
| | | CenterView=T |
| | | ShowColLine=F |
| | | ShowRowLine=F |
| | | Object Border |
| | | Object Pen |
| | | Width=1.5 |
| | | End |
| | | End |
| | | Object Recordset |
| | | Items Field |
| | | Item |
| | | Name='æ¡ç ç¼å·' |
| | | End |
| | | Item |
| | | Name='è¿ææ¥æ' |
| | | Type=DateTime |
| | | Format='yyyy//MM//dd' |
| | | End |
| | | Item |
| | | Name='æ¹å·' |
| | | End |
| | | Item |
| | | Name='ç©æä»£ç ' |
| | | End |
| | | Item |
| | | Name='ç©æåç§°' |
| | | End |
| | | Item |
| | | Name='è§æ ¼åå·' |
| | | End |
| | | Item |
| | | Name='æ°é' |
| | | Type=Currency |
| | | End |
| | | Item |
| | | Name='ä¾åºå代ç ' |
| | | End |
| | | Item |
| | | Name='ä¾åºå' |
| | | End |
| | | Item |
| | | Name='车é´' |
| | | End |
| | | End |
| | | End |
| | | Items Column |
| | | Item |
| | | Name='Column1' |
| | | Width=7.9375 |
| | | End |
| | | End |
| | | Object ColumnContent |
| | | Height=5.79438 |
| | | Items ColumnContentCell |
| | | Item |
| | | Column='Column1' |
| | | FreeCell=T |
| | | Items Control |
| | | Item |
| | | Type=Barcode |
| | | Name='Barcode4' |
| | | Left=4.89479 |
| | | Top=0.370417 |
| | | Width=2.59292 |
| | | Height=2.40771 |
| | | BarcodeType=QRCode |
| | | CheckSum=T |
| | | Text='[#æ¡ç ç¼å·#]' |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=67500,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line32' |
| | | Left=0.15875 |
| | | Top=1.08479 |
| | | Width=4.58 |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line33' |
| | | Left=0.15875 |
| | | Top=0.185208 |
| | | Height=5.45 |
| | | U2D=F |
| | | End |
| | | Item |
| | | Type=MemoBox |
| | | Name='MemoBox18' |
| | | Left=1.69333 |
| | | Top=2.06375 |
| | | Width=2.98979 |
| | | Height=0.79375 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Bold=T |
| | | Charset=134 |
| | | End |
| | | ShrinkFontToFit=T |
| | | WordWrap=T |
| | | Text='[#ç©æä»£ç #]' |
| | | End |
| | | Item |
| | | Type=StaticBox |
| | | Name='StaticBox20' |
| | | Left=0.185208 |
| | | Top=0.47625 |
| | | Width=1.32292 |
| | | Height=0.396875 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | WordWrap=T |
| | | TextAlign=MiddleCenter |
| | | Text='æ¥æ' |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line34' |
| | | Left=0.15875 |
| | | Top=2.88396 |
| | | Width=7.51417 |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line35' |
| | | Left=0.15875 |
| | | Top=0.185208 |
| | | Width=7.51417 |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line36' |
| | | Left=0.15875 |
| | | Top=1.98438 |
| | | Width=4.57729 |
| | | End |
| | | Item |
| | | Type=StaticBox |
| | | Name='StaticBox21' |
| | | Left=0.185208 |
| | | Top=2.27542 |
| | | Width=1.32292 |
| | | Height=0.396875 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | WordWrap=T |
| | | TextAlign=MiddleCenter |
| | | Text='代ç ' |
| | | End |
| | | Item |
| | | Type=MemoBox |
| | | Name='MemoBox20' |
| | | Left=1.69333 |
| | | Top=0.264583 |
| | | Width=2.98979 |
| | | Height=0.79375 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Bold=T |
| | | Charset=134 |
| | | End |
| | | ShrinkFontToFit=T |
| | | WordWrap=T |
| | | Text='[#è¿ææ¥æ#]' |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line41' |
| | | Left=1.50813 |
| | | Top=0.185208 |
| | | Height=5.45 |
| | | U2D=F |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line42' |
| | | Left=7.67292 |
| | | Top=0.185208 |
| | | Height=5.45 |
| | | U2D=F |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line43' |
| | | Left=0.15875 |
| | | Top=3.81 |
| | | Width=7.51417 |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line44' |
| | | Left=0.15875 |
| | | Top=4.70958 |
| | | Width=7.51417 |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line45' |
| | | Left=0.15875 |
| | | Top=5.60917 |
| | | Width=7.51417 |
| | | End |
| | | Item |
| | | Type=MemoBox |
| | | Name='MemoBox21' |
| | | Left=1.69333 |
| | | Top=4.78896 |
| | | Width=5.82083 |
| | | Height=0.79375 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Bold=T |
| | | Charset=134 |
| | | End |
| | | ShrinkFontToFit=T |
| | | WordWrap=T |
| | | Text='[#ä¾åºå代ç #][#ä¾åºå#]' |
| | | End |
| | | Item |
| | | Type=StaticBox |
| | | Name='StaticBox22' |
| | | Left=0.185208 |
| | | Top=5.00063 |
| | | Width=1.32292 |
| | | Height=0.396875 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | WordWrap=T |
| | | TextAlign=MiddleCenter |
| | | Text='ä¾åºå' |
| | | End |
| | | Item |
| | | Type=MemoBox |
| | | Name='MemoBox22' |
| | | Left=1.69333 |
| | | Top=3.86292 |
| | | Width=5.82083 |
| | | Height=0.79375 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Bold=T |
| | | Charset=134 |
| | | End |
| | | ShrinkFontToFit=T |
| | | WordWrap=T |
| | | Text='[#ç©æåç§°#]' |
| | | End |
| | | Item |
| | | Type=StaticBox |
| | | Name='StaticBox23' |
| | | Left=0.185208 |
| | | Top=4.07458 |
| | | Width=1.32292 |
| | | Height=0.396875 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | WordWrap=T |
| | | TextAlign=MiddleCenter |
| | | Text='åç§°' |
| | | End |
| | | Item |
| | | Type=MemoBox |
| | | Name='MemoBox23' |
| | | Left=1.69333 |
| | | Top=2.96333 |
| | | Width=2.98979 |
| | | Height=0.79375 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Bold=T |
| | | Charset=134 |
| | | End |
| | | ShrinkFontToFit=T |
| | | WordWrap=T |
| | | Text='[#è§æ ¼åå·#]' |
| | | End |
| | | Item |
| | | Type=StaticBox |
| | | Name='StaticBox24' |
| | | Left=0.185208 |
| | | Top=3.175 |
| | | Width=1.32292 |
| | | Height=0.396875 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | WordWrap=T |
| | | TextAlign=MiddleCenter |
| | | Text='è§æ ¼' |
| | | End |
| | | Item |
| | | Type=MemoBox |
| | | Name='MemoBox24' |
| | | Left=1.69333 |
| | | Top=1.16417 |
| | | Width=2.98979 |
| | | Height=0.79375 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Bold=T |
| | | Charset=134 |
| | | End |
| | | ShrinkFontToFit=T |
| | | WordWrap=T |
| | | Text='[#æ¹å·#]' |
| | | End |
| | | Item |
| | | Type=StaticBox |
| | | Name='StaticBox25' |
| | | Left=0.185208 |
| | | Top=1.37583 |
| | | Width=1.32292 |
| | | Height=0.396875 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | WordWrap=T |
| | | TextAlign=MiddleCenter |
| | | Text='æ¹å·' |
| | | End |
| | | Item |
| | | Type=StaticBox |
| | | Name='StaticBox26' |
| | | Left=4.70958 |
| | | Top=3.175 |
| | | Width=1.00542 |
| | | Height=0.396875 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Weight=400 |
| | | Charset=134 |
| | | End |
| | | WordWrap=T |
| | | TextAlign=MiddleCenter |
| | | Text='æ°é' |
| | | End |
| | | Item |
| | | Type=MemoBox |
| | | Name='MemoBox25' |
| | | Left=5.79438 |
| | | Top=2.96333 |
| | | Width=1.79917 |
| | | Height=0.820208 |
| | | Object Font |
| | | Name='é»ä½' |
| | | Size=105000,0 |
| | | Bold=T |
| | | Charset=134 |
| | | End |
| | | ShrinkFontToFit=T |
| | | WordWrap=T |
| | | Text='[#æ°é#]' |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line47' |
| | | Left=5.715 |
| | | Top=2.88396 |
| | | Height=0.95 |
| | | U2D=F |
| | | End |
| | | Item |
| | | Type=Line |
| | | Name='Line46' |
| | | Left=4.70958 |
| | | Top=0.185208 |
| | | Height=3.65 |
| | | U2D=F |
| | | End |
| | | End |
| | | End |
| | | End |
| | | End |
| | | Object ColumnTitle |
| | | Height=0 |
| | | Items ColumnTitleCell |
| | | Item |
| | | GroupTitle=F |
| | | Column='Column1' |
| | | TextAlign=MiddleCenter |
| | | Text='Column1' |
| | | End |
| | | End |
| | | End |
| | | End |
| | | Items ReportHeader |
| | | Item |
| | | Name='ReportHeader1' |
| | | Height=0 |
| | | RepeatOnPage=T |
| | | End |
| | | End |
| | | Items ReportFooter |
| | | Item |
| | | Name='ReportFooter1' |
| | | Height=0 |
| | | End |
| | | End |
| | | End |
| New file |
| | |
| | | 1>------ å·²å¯å¨çæ: 项ç®: WebAPI, é
ç½®: Release Any CPU ------ |
| | | 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3277: åç°åä¸ä¾èµç¨åºéçä¸åçæ¬é´å卿 æ³è§£å³çå²çªã 彿¥å¿è¯¦ç»ä¿¡æ¯è®¾ç½®ä¸ºâ详ç»âæ¶ï¼è¿äºå¼ç¨å²çªå°ä¼å¨çææ¥å¿ä¸ååºã |
| | | 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: æçæé¡¹ç®çå¤ç卿¶æâMSILâä¸å¼ç¨âBLL, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86âçå¤ç卿¶æâx86âä¸å¹é
ãè¿ç§ä¸å¹é
å¯è½ä¼å¯¼è´è¿è¡æ¶å¤±è´¥ã请èèéè¿é
置管ç卿´æ¹æ¨ç项ç®çç®æ å¤ç卿¶æï¼ä»¥ä½¿æ¨ç项ç®ä¸å¼ç¨é´çå¤ç卿¶æä¿æä¸è´ï¼æè
为å¼ç¨å
³èä¸ä¸ªä¸æ¨ç项ç®çç®æ å¤ç卿¶æç¸ç¬¦çå¤ç卿¶æã |
| | | 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: æçæé¡¹ç®çå¤ç卿¶æâMSILâä¸å¼ç¨âDBUtility, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86âçå¤ç卿¶æâx86âä¸å¹é
ãè¿ç§ä¸å¹é
å¯è½ä¼å¯¼è´è¿è¡æ¶å¤±è´¥ã请èèéè¿é
置管ç卿´æ¹æ¨ç项ç®çç®æ å¤ç卿¶æï¼ä»¥ä½¿æ¨ç项ç®ä¸å¼ç¨é´çå¤ç卿¶æä¿æä¸è´ï¼æè
为å¼ç¨å
³èä¸ä¸ªä¸æ¨ç项ç®çç®æ å¤ç卿¶æç¸ç¬¦çå¤ç卿¶æã |
| | | 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: æçæé¡¹ç®çå¤ç卿¶æâMSILâä¸å¼ç¨âPub_Class, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86âçå¤ç卿¶æâx86âä¸å¹é
ãè¿ç§ä¸å¹é
å¯è½ä¼å¯¼è´è¿è¡æ¶å¤±è´¥ã请èèéè¿é
置管ç卿´æ¹æ¨ç项ç®çç®æ å¤ç卿¶æï¼ä»¥ä½¿æ¨ç项ç®ä¸å¼ç¨é´çå¤ç卿¶æä¿æä¸è´ï¼æè
为å¼ç¨å
³èä¸ä¸ªä¸æ¨ç项ç®çç®æ å¤ç卿¶æç¸ç¬¦çå¤ç卿¶æã |
| | | 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: æçæé¡¹ç®çå¤ç卿¶æâMSILâä¸å¼ç¨âPub_Control, Version=1.0.6632.19241, Culture=neutral, processorArchitecture=x86âçå¤ç卿¶æâx86âä¸å¹é
ãè¿ç§ä¸å¹é
å¯è½ä¼å¯¼è´è¿è¡æ¶å¤±è´¥ã请èèéè¿é
置管ç卿´æ¹æ¨ç项ç®çç®æ å¤ç卿¶æï¼ä»¥ä½¿æ¨ç项ç®ä¸å¼ç¨é´çå¤ç卿¶æä¿æä¸è´ï¼æè
为å¼ç¨å
³èä¸ä¸ªä¸æ¨ç项ç®çç®æ å¤ç卿¶æç¸ç¬¦çå¤ç卿¶æã |
| | | 1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5): warning MSB3270: æçæé¡¹ç®çå¤ç卿¶æâMSILâä¸å¼ç¨âSQLHelper, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86âçå¤ç卿¶æâx86âä¸å¹é
ãè¿ç§ä¸å¹é
å¯è½ä¼å¯¼è´è¿è¡æ¶å¤±è´¥ã请èèéè¿é
置管ç卿´æ¹æ¨ç项ç®çç®æ å¤ç卿¶æï¼ä»¥ä½¿æ¨ç项ç®ä¸å¼ç¨é´çå¤ç卿¶æä¿æä¸è´ï¼æè
为å¼ç¨å
³èä¸ä¸ªä¸æ¨ç项ç®çç®æ å¤ç卿¶æç¸ç¬¦çå¤ç卿¶æã |
| | | 1> WebAPI -> C:\Users\lenovo\documents\visual studio 2013\Projects\WebAPI\WebAPI\bin\WebAPI.dll |
| | | 2>------ åå¸å·²å¯å¨: 项ç®: WebAPI, é
ç½®: Release Any CPU ------ |
| | | 2>æ£å¨è¿æ¥å° D:\ç½ç«åå¸\WebSite... |
| | | 2>å·²ä½¿ç¨ C:\Users\lenovo\documents\visual studio 2013\Projects\WebAPI\WebAPI\Web.Release.config å° Web.config 转æ¢ä¸º obj\Release\TransformWebConfig\transformed\Web.configã |
| | | 2>æ£å¨å°æææä»¶é½å¤å¶å°ä»¥ä¸ä¸´æ¶ä½ç½®ä»¥è¿è¡æå
/åå¸: |
| | | 2>obj\Release\Package\PackageTmpã |
| | | 2>æ£å¨å叿件夹 /... |
| | | 2>æ£å¨å叿件夹 bin... |
| | | 2>æ£å¨å叿件夹 bin/zh-Hans... |
| | | 2>æ£å¨å叿件夹 DLL... |
| | | 2>æ£å¨å叿件夹 Metadata... |
| | | 2>æ£å¨å叿件夹 Metadata/deploymentTemplates... |
| | | 2>Web åºç¨å·²æååå¸ file:///D:/%E7%BD%91%E7%AB%99%E5%8F%91%E5%B8%83/WebSite |
| | | 2> |
| | | ========== çæ: æå 1 个ï¼å¤±è´¥ 0 ä¸ªï¼ææ° 0 个ï¼è·³è¿ 0 个 ========== |
| | | ========== åå¸: æå 1 个ï¼å¤±è´¥ 0 个ï¼è·³è¿ 0 个 ========== |