Beispiel #1
0
 protected void btnFind_Click(object sender, EventArgs e)
 {
     if (BillID > 0)
     {
         SYS_BILL_BLL billExd  = new SYS_BILL_BLL(BillID);
         SYS_BILL_OBJ condBill = billExd.GetBillObjByFindForm();
         //Response.Write(billExd.GetFindColsObjectString());
         litFind.Text = billExd.HtmlFindForm(condBill);
         litList.Text = billExd.HtmlList(condBill);
     }
 }
Beispiel #2
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        SYS_BILL_BLL billExd = new SYS_BILL_BLL(BillID);
        int          re      = 0;

        if (KeyID > 0)
        {
            SYS_BILL_OBJ valBill = billExd.GetBillObjByEditForm();
            //valBill.SetValue(
            //if (billExd.HadSubBill() && hidDetailRows.Value != "")
            //{
            //    re = billExd.UpdateRecord(KeyID, int.Parse(hidDetailRows.Value));
            //}
            //else
            //{
            re = billExd.Update(valBill, KeyID.ToString());//requ
            //}
        }
        else
        {
            //if (billExd.HadSubBill() && hidDetailRows.Value != "")
            //{
            //    re = billExd.InsertRecord(int.Parse(hidDetailRows.Value));
            //}
            //else
            //{
            SYS_BILL_OBJ valBill = billExd.GetBillObjByEditForm();
            re = billExd.Insert(new SYS_BILL_OBJ());
            //}
        }
        if (re > 0)
        {
            if (Request["modlg"] != null)
            {
                AgileFrame.Core.ScriptHelper.CloseMe(Page);
            }
            else
            {
                Response.Redirect("BillList.aspx?BillID=" + BillID);
            }
        }
        else
        {
            litWarn.Text = "提交失败!";
        }
    }