| | |
| | | { |
| | | continue; |
| | | } |
| | | if(!string.IsNullOrEmpty(item["æ¥æ"]) ) |
| | | { |
| | | item["年份"]=item["æ¥æ"].Split('-')[0]; |
| | | item["æä»½"] =item["æ¥æ"].Split('-')[1]; |
| | | |
| | | } |
| | | |
| | | insertSql.AppendLine($"INSERT INTO [Cb_OtherOutBill_CostSubjectDetail] ([HYear], [HPeriod], [HBillType], [HBillSubType], [HDate], [HBillNo], [HBillStatus], [HCheckItemNowID], [HCheckItemNextID], [HCheckFlowID], [HRemark], [HBacker], [HBackDate], [HChecker], [HCheckDate], [HMaker], [HMakeDate], [HUpDater], [HUpDateDate], [HCloseMan], [HCloseDate], [HCloseType], [HDeleteMan], [HDeleteDate], [HWareHouse], [HStockPlace], [HUseType], [HUseDepartment], [HCostSubject], [HCostSubjectSon], [HSubjectProc], [HMaterNumber], [HMaterName], [HModel], [HUnit], [HQty], [HCostPrice], [HTotalPrice], [HLOT], [HRemark2], [HUsePerson], [HWareHousePerson], [HAssetName], [HAssetNumber], [HSearchProject], [HVerify]) VALUES ("); |
| | | insertSql.AppendLine($" {item["年份"]}, {item["æä»½"]}, {1}, '{1}', '{item["æ¥æ"]}', '{item["åæ®ç¼å·"]}', '{1}', '{1}', '{1}', '{1}', '{item["夿³¨"]}', '{""}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{""}', '{DateTime.Now}', '{"0"}', '{""}', '{DateTime.Now}', '{item["åè´§ä»åº"]}', '{item["ä»ä½"]}', '{item["é¢æç±»å"]}', '{item["颿é¨é¨"]}', '{item["ææ¬ç§ç®"]}', '{item["ææ¬ç§ç®äºçº§"]}', '{item["ç§ç®+å·¥åº"]}', '{item["ç©æç¼ç "]}', '{item["ç©æåç§°"]}', '{item["è§æ ¼åå·"]}', '{item["åä½"]}', '{item["å®åæ°é"]}', '{item["ææ¬ä»·"]}', '{item["æ»ææ¬"]}', '{item["æ¹å·"]}', '{"excel导å
¥"}', '{item["é¢æäºº"]}', '{item["ä»ç®¡å"]}', '{item["èµäº§åç§°"]}', '{item["èµäº§ç¼å·"]}', '{item["ç å项ç®"]}', '{item["æ ¸å¯¹"]}');"); |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region å é¤ |
| | | [Route("Cb_OtherOutBill_CostSubjectDetail/DeltetCb_OtherOutBill_CostSubjectDetail")] |
| | | [HttpGet] |
| | | public object DeltetCb_OtherOutBill_CostSubjectDetail(string HItemIDs, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //å 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_CostAverageType_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿é"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemIDs)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from Cb_OtherOutBill_CostSubjectDetail where HInterID in (" + HItemIDs+" )", "Cb_OtherOutBill_CostSubjectDetail"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ°æ®ï¼æ æ³å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | else if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·²ç»å®¡æ ¸ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | |
| | | |
| | | //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); |
| | | //if (HStopflag) |
| | | //{ |
| | | // oCN.RollBack();//åæ»äºå¡ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ°æ®å·²è¢«ç¦ç¨æ æ³å次å é¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | oCN.RunProc("delete from Cb_OtherOutBill_CostSubjectDetail where HInterID in (" + HItemIDs + ")"); |
| | | |
| | | |
| | | |
| | | ////åå
¥æ¥å¿ |
| | | //string Operation = "å é¤"; //æä½ |
| | | //string ComputerName = System.Net.Dns.GetHostName(); //设å¤åç§° |
| | | //string WorkList = Operation + "ææ¬åé
ç±»åï¼ææ¬åé
ç±»å代ç ï¼" + HNumber + "ï¼ææ¬åé
ç±»ååç§°ï¼" + HName; //æä½è¯¦æ
|
| | | //string MvarReportTitle = "ææ¬åé
ç±»åå表"; //æä½æ¨¡å |
| | | //string SystemName = "LMES-" + MvarReportTitle + "模å"; //æä½æ¨¡å |
| | | //string IPAddress = ""; |
| | | ////string IPAddress = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0].ToString(); //IPå°å |
| | | ////string IPAddress = System.Web.HttpContext.Current.Request.UserHostAddress; |
| | | |
| | | //oCN.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + |
| | | // "(getdate(),'" + user + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','" + Operation + "')" |
| | | // ); |
| | | |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "* æ°æ®å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |