private void GetData() { string strWhere = "1=1"; string year = Request["year"]; string month = Request["month"]; string pointId = Request["pointId"]; //DataTable dt = new TEnvFillSeaLogic().GetSeaFillData(year, month, pointId); //string json = DataTableToJsonUnsureCol(dt, "_unSure"); //Response.ContentType = "application/json"; //拼写条件语句(注:条件中的列名要与点位上的列名一致) if (year != "") { strWhere += " and YEAR='" + year + "'"; } if (month != "") { strWhere += " and MONTH='" + month + "'"; } if (pointId != "") { strWhere += " and ID='" + pointId + "'"; } DataTable dtShow = new DataTable();//填报表需要显示信息 dtShow = new TEnvFillSeaLogic().CreateShowDT(); CommonLogic com = new CommonLogic(); DataTable dt = com.GetFillData(strWhere, dtShow, "", TEnvPointSeaVo.T_ENV_POINT_SEA_TABLE, TEnvPointSeaItemVo.T_ENV_POINT_SEA_ITEM_TABLE, TEnvFillSeaVo.T_ENV_FILL_SEA_TABLE, TEnvFillSeaItemVo.T_ENV_FILL_SEA_ITEM_TABLE, SerialType.T_ENV_FILL_SEA, SerialType.T_ENV_FILL_SEA_ITEM, "0"); string json = DataTableToJsonUnsureCol(dt); Response.ContentType = "application/json;charset=utf-8"; Response.Write(json); Response.End(); }
private void GetFillID() { string year = Request["year"]; string month = Request["month"]; TEnvFillSeaVo envFillSeaVo = new TEnvFillSeaVo(); envFillSeaVo.YEAR = year; envFillSeaVo.MONTH = month; envFillSeaVo = new TEnvFillSeaLogic().Details(envFillSeaVo); string json = "{\"ID\":\"" + envFillSeaVo.ID + "\",\"STATUS\":\"" + envFillSeaVo.STATUS + "\"}"; Response.ContentType = "application/json;charset=utf-8"; Response.Write(json); Response.End(); }
private string SaveFWData(string save, string filltype, string ID) { bool flag = false; string head = string.Empty; string strResult = string.Empty; if (!string.IsNullOrEmpty(filltype)) { switch (filltype) { case "SeaFill": TEnvFillSeaVo sea = new TEnvFillSeaVo(); sea.ID = GetSerialNumber(SerialType.T_ENV_FILL_SEA); head = sea.ID; flag = new TEnvFillSeaLogic().Create(sea); break; case "DrinkSource": TEnvFillDrinkSrcVo Drink = new TEnvFillDrinkSrcVo(); Drink.ID = GetSerialNumber(SerialType.T_ENV_FILL_DRINK_SRC); head = Drink.ID; flag = new TEnvFillDrinkSrcLogic().Create(Drink); break; case "Payfor": TEnvFillPayforVo payfor = new TEnvFillPayforVo(); payfor.ID = GetSerialNumber(SerialType.T_ENV_FILL_PAYFOR); head = payfor.ID; flag = new TEnvFillPayforLogic().Create(payfor); break; } if (flag == true) { strResult = head; } else { strResult = ""; } } return(strResult); }