//获取外包单位 private void GetOutCompany() { string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; int intPageIdx = Convert.ToInt32(Request.Params["page"]); int intPagesize = Convert.ToInt32(Request.Params["pagesize"]); string strSrhSrhCOMPANY_NAME = (Request.Params["SrhCOMPANY_NAME"] != null) ? Request.Params["SrhCOMPANY_NAME"] : ""; string strSrhCOMPANY_CODE = (Request.Params["SrhCOMPANY_CODE"] != null) ? Request.Params["SrhCOMPANY_CODE"] : ""; if (strSortname == null || strSortname.Length == 0) { strSortname = TBaseOutcompanyInfoVo.ID_FIELD; } TBaseOutcompanyInfoVo objOutCompany = new TBaseOutcompanyInfoVo(); objOutCompany.IS_DEL = "0"; objOutCompany.COMPANY_NAME = strSrhSrhCOMPANY_NAME; objOutCompany.COMPANY_CODE = strSrhCOMPANY_CODE; objOutCompany.SORT_FIELD = strSortname; objOutCompany.SORT_TYPE = strSortorder; TBaseOutcompanyInfoLogic logicOutCompany = new TBaseOutcompanyInfoLogic(); int intTotalCount = logicOutCompany.GetSelectResultCount(objOutCompany);;//总计的数据条数 DataTable dt = logicOutCompany.SelectByTable(objOutCompany, intPageIdx, intPagesize); string strJson = CreateToJson(dt, intTotalCount); Response.Write(strJson); }
public static string AddOutCompany(string strCOMPANY_NAME, string strCOMPANY_CODE, string strLINK_MAN, string strPHONE, string strPOST, string strADDRESS, string strAPTITUDE) { bool isSuccess = true; TBaseOutcompanyInfoVo objOutCompany = new TBaseOutcompanyInfoVo(); objOutCompany.ID = GetSerialNumber("t_base_out_company_info_id"); objOutCompany.IS_DEL = "0"; objOutCompany.COMPANY_NAME = strCOMPANY_NAME; objOutCompany.COMPANY_CODE = strCOMPANY_CODE; objOutCompany.LINK_MAN = strLINK_MAN; objOutCompany.PHONE = strPHONE; objOutCompany.POST = strPOST; objOutCompany.ADDRESS = strADDRESS; objOutCompany.APTITUDE = strAPTITUDE; isSuccess = new TBaseOutcompanyInfoLogic().Create(objOutCompany); if (isSuccess) { new PageBase().WriteLog("新增外包单位", "", new PageBase().LogInfo.UserInfo.USER_NAME + "新增外包单位" + objOutCompany.ID + "成功"); return("1"); } else { return("0"); } }
public static string EditOutCompany(string strID, string strCOMPANY_NAME, string strCOMPANY_CODE, string strLINK_MAN, string strPHONE, string strPOST, string strADDRESS, string strAPTITUDE) { bool isSuccess = true; TBaseOutcompanyInfoVo objOutCompany = new TBaseOutcompanyInfoVo(); objOutCompany.ID = strID; objOutCompany.IS_DEL = "0"; objOutCompany.COMPANY_NAME = strCOMPANY_NAME; objOutCompany.COMPANY_CODE = strCOMPANY_CODE; objOutCompany.LINK_MAN = strLINK_MAN; objOutCompany.PHONE = strPHONE; objOutCompany.POST = strPOST; objOutCompany.ADDRESS = strADDRESS; objOutCompany.APTITUDE = strAPTITUDE; isSuccess = new TBaseOutcompanyInfoLogic().Edit(objOutCompany); if (isSuccess) { new PageBase().WriteLog("修改外包单位", "", new PageBase().LogInfo.UserInfo.USER_NAME + "修改外包单位" + objOutCompany.ID + "成功"); return("1"); } else { return("0"); } }
public static string deleteOutCompany(string strDelIDs) { if (strDelIDs.Length == 0) { return("0"); } string[] arrDelIDs = strDelIDs.Split(','); bool isSuccess = true; for (int i = 0; i < arrDelIDs.Length; i++) { TBaseOutcompanyInfoVo objOutCompany = new TBaseOutcompanyInfoVo(); objOutCompany.ID = arrDelIDs[i]; objOutCompany.IS_DEL = "1"; isSuccess = new TBaseOutcompanyInfoLogic().Edit(objOutCompany); if (isSuccess) { new PageBase().WriteLog("删除外包单位", "", new PageBase().LogInfo.UserInfo.USER_NAME + "删除外包单位" + objOutCompany.ID + "成功"); } TBaseOutcompanyAllowVo objAllowWhere = new TBaseOutcompanyAllowVo(); objAllowWhere.OUTCOMPANY_ID = arrDelIDs[i]; if (new TBaseOutcompanyAllowLogic().Delete(objAllowWhere)) { new PageBase().WriteLog("删除外包单位资质", "", new PageBase().LogInfo.UserInfo.USER_NAME + "删除外包单位" + objAllowWhere.OUTCOMPANY_ID + "的资质成功"); } } if (isSuccess) { return("1"); } else { return("0"); } }