Ejemplo n.º 1
0
    /// <summary>
    /// Game objects initialization, if found
    /// </summary>
    private void InitGameObjectReferences()
    {
        GameObject weekGameObject = GameObject.FindGameObjectWithTag("WeekText");

        if (weekGameObject != null)
        {
            weekValue = weekGameObject.GetComponent <TextMeshProUGUI>();
        }
        GameObject moneyGameObject = GameObject.FindGameObjectWithTag("MoneyValue");

        moneyValue = moneyGameObject.GetComponent <TextMeshProUGUI>();

        GameObject effectListGameObject = GameObject.FindGameObjectWithTag("EffectList");

        if (effectListGameObject != null)
        {
            effectList = effectListGameObject.transform;
        }

        GameObject hospitalGameObject = GameObject.FindGameObjectWithTag("HospitalController");

        if (hospitalGameObject != null)
        {
            hospitalController = hospitalGameObject.GetComponent <HospitalController>();
        }

        GameObject moneyPanelGameObject = GameObject.FindGameObjectWithTag("MoneyPanel");

        if (moneyPanelGameObject != null)
        {
            hospitalHandler = moneyPanelGameObject.GetComponent <HospitalHandler>();
        }
    }
Ejemplo n.º 2
0
    public dotNetFlexGrid.DataHandlerResult FlexGridHospitalDataHandler(dotNetFlexGrid.DataHandlerParams p)
    {
        dotNetFlexGrid.DataHandlerResult result = new dotNetFlexGrid.DataHandlerResult();
        result.page  = p.page; //设定当前返回的页号
        result.total = 100;    //总计的数据条数,此处用100进行模拟,查询和筛选时需要根据实际

        HospitalHandler hhandler = new HospitalHandler();
        string          hname    = "0";

        if (p.extParam.ContainsKey("hname"))
        {
            hname = p.extParam["hname"];
        }
        string hnum = "0";

        if (p.extParam.ContainsKey("hnum"))
        {
            hnum = p.extParam["hnum"];
        }


        result.table = hhandler.SearchHospital(hname, hnum);

        return(result);
    }
Ejemplo n.º 3
0
    public static string HospitalInfo(int id, string hname, string hshortname, string hnum, string contacter, string phone, string address, string pricetype)
    {
        HospitalHandler winfo  = new HospitalHandler();
        int             result = winfo.updateHospitalInfo(id, hname, hshortname, hnum, contacter, phone, address, pricetype);

        string str = null;

        if (result == 0)
        {
            str = "0";
        }
        else
        {
            str = "1";
        }

        return(str);
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt16(Request.QueryString["id"]);
            idnum1.Value = Request.QueryString["id"].ToString();
            HospitalHandler rm = new HospitalHandler();
            DataTable       dt = rm.findHospitalInfo(id);

            hnum11.Value       = dt.Rows[0]["hnum"].ToString();
            hname11.Value      = dt.Rows[0]["hname"].ToString();
            hshortname11.Value = dt.Rows[0]["hshortname"].ToString();
            contacter11.Value  = dt.Rows[0]["contacter"].ToString();
            phone11.Value      = dt.Rows[0]["phone"].ToString();
            address11.Value    = dt.Rows[0]["address"].ToString();
            pricetype11.Value  = dt.Rows[0]["pricetype"].ToString();
            //settler11.Value = dt.Rows[0]["settler"].ToString();
            // HPerSetInfor11.Value = dt.Rows[0]["HPerSetInfor"].ToString();
        }
    }
Ejemplo n.º 5
0
    public static string addHospitalinfo(string hname, string hshortname, string hnum, string contacter, string phone, string address, string pricetype)
    {
        string result = "";


        //string str2 = str1.TrimStart('0');
        HospitalHandler wr = new HospitalHandler();

        int sdr = wr.AddHospital(hname, hshortname, hnum, contacter, phone, address, pricetype);

        if (sdr == 0)
        {
            result = "0";
        }
        else
        {
            result = "1";
        }

        return(result);
    }
Ejemplo n.º 6
0
 public async Task <IActionResult> Enable([FromBody] ActiveHospitalCommand command, [FromServices] HospitalHandler handler)
 {
     return(Ok(await handler.Handler(command)));
 }