Exemplo n.º 1
0
 protected override void Fire(object sender, EventArgs e)
 {
     if (!UserInfo.IsSysAdmin(Session))
     {
         alertAndGoback("you are not a system administrator. Please login");
         return;
     }
     Data data = new Data();
     data.add("ID", Param.get("itemID"));
     GeneralPaymentBiz biz = new GeneralPaymentBiz();
     Data result = biz.viewdetail(data);
     Data droplist = biz.droplist(data);
     TypeDropDownList.DataSource = droplist.Source;
     TypeDropDownList.DataBind();
     TypeDropDownList.SelectedValue = result.getString("Type");
     ItemTextBox.Text = result.getString("Item");
     PriceTextBox.Text = result.getString("Price");
     InsuranceStateTextBox.SelectedValue = result.getString("insuranceState");
     ItemID.Text = result.getString("ID");
 }
Exemplo n.º 2
0
    protected override void Fire(object sender, EventArgs e)
    {
        if (!UserInfo.IsSysAdmin(Session))
        {
            alertAndGoback("you are not a system administrator. Please login");
            return;
        }
        String ID = Param.getString("itemID");
        Data data = new Data();
        GeneralPaymentBiz biz = new GeneralPaymentBiz();
        if (!"".Equals(ID))
        {
            data.add("ID", ID);
            biz.delete(data);
        }
        Data result = biz.view(data);
        Data droplist = biz.droplist(data);

        for (int i = 0; i < result.Count; i++)
        {
            String state = "covered";
            if ("1".Equals(result.getString(i, "insuranceState")))
            {
                state = "not covered";
            }
            result.add(i, "insuranceState", state);
        }

        general_payment_items.DataSource = result.Source;
        general_payment_items.DataBind();

        Type.DataSource = droplist.Source;
        Type.DataBind();
        TypeDropDownList.DataSource = droplist.Source;
        TypeDropDownList.DataBind();
    }