Пример #1
0
    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.isReceptionist(Session))
        {
            alertAndGoback("PLEASE, LOGIN");
            return;
        }
        float rate;
        Data data = new Data();
        pId.Value = Param.getString("pId");
        data.add("patientId", Param.getString("pId"));
        List<Data> result = biz.view(data);

        rate = float.Parse(result[2].getString("rate"));
        rate = 100 - rate;
        int count = result[0].Count;
        float total = 0;
        for (int i = 0; i < count; i++)
        {
            float price = float.Parse(result[0].getString(i,"Price"));
            if ("0".Equals(result[0].getString(i, "insuranceState")))
            {
                price = (price * rate) / 100;
            }
            price = (price - price % (float)0.01);
            result[0].add(i, "afterPrice", price);
            result[0].add(i, "date", result[0].getString(i, "date").Substring(0, 10));
            total += price;
        }
        count = result[1].Count;
        for (int i = 0; i < count; i++)
        {
            float price = float.Parse(result[1].getString(i, "T_Price"));
            if ("0".Equals(result[1].getString(i, "insuranceState")))
            {
                price = (price * rate) / 100;
            }
            price = (price - price % (float)0.01);
            result[1].add(i, "afterPrice", price);
            result[1].add(i, "date", result[1].getString(i, "date").Substring(0, 10));
            total += price;
        }

        historyView.DataSource = result[0].Source;
        historyView.DataBind();
        medicineView.DataSource = result[1].Source;
        medicineView.DataBind();
        User userBiz = new User();
        data.add("userId", pId.Value );
        Data pData = userBiz.view(data);
        userInfo.Text = pData.getString("UserID") + " [" + pData.getString("UserFirstName") + ", " + pData.getString("UserSurName") + "]";
        totalPrice.Text = total.ToString();
        USEREMAIL.Text = pData.getString("Email");
        INSURANNUMBER.Text = pData.getString("InsuranceNumber");
        CREATEDDATE.Text = DateTime.Now.Date.ToString().Substring(0, 10);
    }
Пример #2
0
    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.isReceptionist(Session))
        {
            alertAndGoback("Please, LOGIN!!");
            return;
        }

        User user = new User();
        List<Data> list = user.getDefaultInfo();
        Data userInfo = user.view(Param);
        UserID.Text = userInfo.getString("UserID");
        UserFirstName.Text = userInfo.getString("UserFirstName");
        UserMiddleName.Text = userInfo.getString("UserMiddleName");
        UserSurName.Text = userInfo.getString("UserSurName");
        Occupation.DataSource = list[0].Source;
        Occupation.DataBind();

        MaritalID.DataSource = list[1].Source;
        MaritalID.DataBind();
        MaritalID.SelectedValue = userInfo.getString("MaritalID");

        JobCode.DataSource = list[2].Source;
        JobCode.DataBind();

        JobCode.SelectedValue = userInfo.getString("JobCode");

        Nationality.DataSource = list[3].Source;
        Nationality.DataBind();

        Nationality.SelectedValue = userInfo.getString("Nationality");

        TitleID.DataSource = list[4].Source;
        TitleID.DataBind();
        TitleID.SelectedValue = userInfo.getString("TitleID");
        GenderID.DataSource = list[5].Source;
        GenderID.DataBind();
        GenderID.SelectedValue = userInfo.getString("GenderID");

        StateCode.DataSource = list[6].Source;
        StateCode.DataBind();
        StateCode.SelectedValue = userInfo.getString("StateCode");
        DOB.Text = userInfo.getString("DOB").Substring(0, 10);
        Address.Text = userInfo.getString("Address");
        PostCode.Text = userInfo.getString("PostCode");
        PhoneNumber.Text = userInfo.getString("PhoneNumber");
        Email.Text = userInfo.getString("Email");

        PatientFatherFirstName.Text = userInfo.getString("PatientFatherFirstName");
        PatientFatherLastName.Text = userInfo.getString("PatientFatherLastName");
        PatientMotherFirstName.Text = userInfo.getString("PatientMotherFirstName");
        PatientMotherLastName.Text = userInfo.getString("PatientMotherLastName");
    }