コード例 #1
0
        private void TDB_ab_del_Click(object sender, System.EventArgs e)
        {
            int rows = 0;

            offer.Get(Convert.ToInt32(tdb_e_id.Text), ref rows);
            offer.Delete();
        }
コード例 #2
0
        void TDB_ab_sel_Click_Return(object sender, EventArgs e)
        {
            int     id = -1, rows = 0;
            SelForm Fsel = (SelForm)sender;

            id = Fsel.GetID;
            offer.Get(id, ref rows);
            tdb_e_id.Text   = offer.ObjId.ToString();
            tdb_e_bez.Text  = offer.ObjBez;
            tdb_e_text.Text = offer.ObjText;
            tdb_e_code.Text = offer.ObjCode;
            if (offer.ObjParentId == -1)
            {
                this.Off_e_parent.SelectedValue = -1;
                this.Off_e_ishost.CheckState    = CheckState.Checked;
                this.Off_e_parent.Visible       = false;
                ishost = true;
                this.Off_b_createserv.Enabled = true;
            }
            else
            {
                this.Off_e_parent.SelectedValue = offer.ObjParentId;
                this.Off_e_ishost.CheckState    = CheckState.Unchecked;
                this.Off_e_parent.Visible       = true;
                ishost = false;
                this.Off_b_createserv.Enabled = false;
            }
            Off_e_ord.Text                   = offer.ObjOrder.ToString();
            this.Off_e_duration.Value        = offer.ObjDuration;
            this.Off_e_location.Text         = offer.ObjLocation;
            this.Off_e_dlt.SelectedValue     = offer.ObjSuplier;
            this.Off_e_to.SelectedValue      = offer.ObjTo;
            this.Off_e_from.SelectedValue    = offer.ObjFrom;
            this.Off_e_act.SelectedValue     = offer.ObjAction;
            this.Off_e_offtype.SelectedValue = offer.ObjType;
        }