| | |
| | | /// </summary> |
| | | [Route("Gy_ClassTimePrj/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ClassTimePrj", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ClassTimePrjList " + sWhere, "h_v_Gy_ClassTimePrjList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ClassTimePrjList order by æ ¸ç®æ¹å¼ä»£ç ", "h_v_Gy_ClassTimePrjList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Gy_ClassTimePrjList where 1 = 1 "; |
| | | string sql = sql1 + sWhere; |
| | | string sql = sql1 + sWhere+ " order by æ ¸ç®æ¹å¼ä»£ç "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_ClassTimePrjList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "æ æ°æ®"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | DAL.ClsGy_ClassTimePrj_View oDeptHlp = new DAL.ClsGy_ClassTimePrj_View(); |
| | | try |
| | | { |
| | | //if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true, User)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没æå 餿é"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æå 餿é"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oDeptHlp.GetInfoByID(HItemID)) |
| | | { |
| | | if (oDept.HavChildCodes(HItemID)) |
| | |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | //夿æé |
| | | if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ååºåå |
| | | msg1 = "[" + msg1.ToString() + "]"; |
| | | List<ClsGy_ClassTimePrj_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_ClassTimePrj_Model>>(msg1); |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<ClsGy_ClassTimePrj_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsGy_ClassTimePrj_Model>>(msg2); |
| | | long HItemID = list[0].HItemID.ToString() == "" ? 0 : list[0].HItemID; |
| | | string HNumber = list[0].HNumber; |
| | | string HName = list[0].HName; |
| | |
| | | long HGroupID = list[0].HGroupID; |
| | | |
| | | //夿æé |
| | | //if (!ClsPub.Security_Log(msg5, 1, true, msg4)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |