| | |
| | | foreach (DataRow dr in dset.Tables[0].Rows) |
| | | { |
| | | _pglist.list.Add( |
| | | new |
| | | new |
| | | { |
| | | guid = Guid.Parse(dr["guid"].ToString()), |
| | | upGuid = dr["upGuid"].ToString(), |
| | | name = dr["name"].ToString(), |
| | | conPeople = dr["conPeople"].ToString(), |
| | | conTel = int.Parse(dr["conTel"].ToString()), |
| | | conTel = dr["conTel"].ToString(), |
| | | status = int.Parse(dr["status"].ToString()), |
| | | } |
| | | ); |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<int?> DeleteModel([FromBody] MenuAction model) |
| | | public ReturnDto<int?> DeleteModel([FromBody] dynamic model) |
| | | { |
| | | int rtnInt = (int)ReturnCode.Default; |
| | | int cont = 0; |
| | |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<int?> EditModel([FromBody] dynamic model) |
| | | { |
| | | Guid? guid = model.guid; |
| | | Guid? upGuid = model.upGuid; |
| | | Guid? guid = UtilityHelper.GetGuid(model.guid.ToString()); |
| | | Guid? upGuid = UtilityHelper.GetGuid(model.upGuid.ToString()); |
| | | string name = model.name; |
| | | string conPeople = model.conPeople; |
| | | string conTel = model.conTel; |
| | | int status = model.status; |
| | | int? rtnInt = (int)ReturnCode.Default; |
| | | if (upGuid == null)//只能有一个根组织 |
| | | { |
| | | int cont = 0; |
| | | cont = int.Parse(DbHelperSQL.GetSingle("select count(1) from sys_Organization where upguid is null").ToString()); |
| | | if (cont > 0) |
| | | { |
| | | return ReturnDto<int>.QuickReturn(default(int?), ReturnCode.Exception, "增加失败,请选择上级组织!"); |
| | | } |
| | | } |
| | | StringBuilder strSql = new StringBuilder(); |
| | | if (guid != null) |
| | | { |