Beispiel #1
0
    private void GetFillID()
    {
        string year  = Request["year"];
        string month = Request["month"];

        TEnvFillPayforVo envFillPayforVo = new TEnvFillPayforVo();

        envFillPayforVo.YEAR  = year;
        envFillPayforVo.MONTH = month;

        envFillPayforVo = new TEnvFillPayforLogic().Details(envFillPayforVo);

        string json = "{\"ID\":\"" + envFillPayforVo.ID + "\",\"STATUS\":\"" + envFillPayforVo.STATUS + "\"}";

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
Beispiel #2
0
    private void GetData()
    {
        string strWhere = "1=1";
        string year     = Request["year"];
        string month    = Request["month"];
        string pointId  = Request["pointId"];

        //拼写条件语句(注:条件中的列名要与点位上的列名一致)
        if (year != "")
        {
            strWhere += " and YEAR='" + year + "'";
        }
        if (month != "")
        {
            strWhere += " and MONTH='" + month + "'";
        }
        if (pointId != "")
        {
            strWhere += " and ID='" + pointId + "'";
        }

        //填报表需要显示信息(注:这Table里面的第一列数据要与填报表的列名一致)
        DataTable dtShow = new DataTable();

        dtShow = new TEnvFillPayforLogic().CreateShowDT();

        CommonLogic com = new CommonLogic();
        DataTable   dt  = com.GetFillData(strWhere,
                                          dtShow,
                                          "",
                                          TEnvPPayforVo.T_ENV_P_PAYFOR_TABLE,
                                          TEnvPPayforItemVo.T_ENV_P_PAYFOR_ITEM_TABLE,
                                          TEnvFillPayforVo.T_ENV_FILL_PAYFOR_TABLE,
                                          TEnvFillPayforItemVo.T_ENV_FILL_PAYFOR_ITEM_TABLE,
                                          SerialType.T_ENV_FILL_PAYFOR,
                                          SerialType.T_ENV_FILL_PAYFOR_ITEM,
                                          "0");

        string json = DataTableToJsonUnsureCol(dt);

        Response.ContentType = "application/json";
        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);
    }