Exemplo n.º 1
0
    override protected int ExecInsert()
    {
        try
        {
            DADiscount DADiscount = CreateObjectFromPage();

            if (this.mode == ActParam.New)
            {
                DADiscount.fID = DADiscount.USP_GetKey();
                this.KeyID     = DADiscount.fID; // --> Update new SessionID for continue edit.
            }
            else
            {
                DADiscount.fID = 0;
            }

            DADiscount.USP_Discount_Insert();
            return(UpdateCategory() == true ? 1 : -1);
        }
        catch { return(0); }
    }