| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using SyntacticSugar.constant; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region è´¨éæåº¦ç®æ å å页å表 |
| | | [Route("QC_MonthTarGetBill/getQC_MonthTarGetBillListPage")] |
| | | [HttpGet] |
| | | public json getQC_MonthTarGetBillListPage(string sWhere, string user, int page, int size) |
| | | { |
| | | DataSet ds; |
| | | json res = new json(); |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_MonthTarGetBill_Query", 3, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åæé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | sWhere = sWhere.Replace("'", "''"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_QC_MonthTarGetBillMainList " + page + "," + size + ",''", "h_p_QC_MonthTarGetBillMainList"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_QC_MonthTarGetBillMainList " + page + "," + size + ",'" + sWhere + "'", "h_p_QC_MonthTarGetBillMainList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | res.code = CodeConstant.SUCCEED; |
| | | res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); |
| | | res.Message = "Sucessï¼"; |
| | | res.list = columnNameList; |
| | | res.data = ds.Tables[0]; |
| | | return res; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | res.code = CodeConstant.FAIL; |
| | | res.count = CountConstant.FAIL; |
| | | res.Message = "Exceptionï¼" + e.ToString(); |
| | | res.data = null; |
| | | return res; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region è´¨éæåº¦ç®æ å ä¿å/ç¼è¾ |
| | | /// <summary> |
| | |
| | | } |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "7523"; |
| | | oItem.HBillSubType = "7523"; |
| | | |
| | | |
| | | |
| | | //oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | //oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HBillSubType = "7523"; |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½(å 载表ç¨) |
| | | /// <summary> |
| | | /// æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | #region è´¨éæåº¦ç®æ å ç¼è¾åæ¾ |
| | | [Route("QC_MonthTarGetBill/cx")] |
| | | [HttpGet] |
| | | public object cx(long HInterID) |