/// <summary> /// Update a CustomerContact. /// </summary> public void Update(Model.CustomerContact customerContact) { // // todo: add other logic here. // accessor.Update(customerContact); }
/// <summary> /// Insert a CustomerContact. /// </summary> public void Insert(Model.CustomerContact customerContact) { // // todo:add other logic here // accessor.Insert(customerContact); }
private void simpleButtonAdd_Click(object sender, EventArgs e) { //if (action != "view") //{ ClearText(); SetTextEditReadOnly(false); _ac = "insert"; cc = new Book.Model.CustomerContact(); this.simpleButtonAdd.Enabled = false; this.simpleButtonSave.Enabled = true; this.simpleButtonModify.Enabled = false; this.simpleButtonDel.Enabled = false; this.simpleButtonUndo.Enabled = true; //} }
protected override void AddNew() { this._customer = new Model.Customer(); //this._customer.LastTransactionDate = DateTime.Now; this._customer.Id = this.customerManager.GetNewId(); //联系人 ClearText(); SetTextEditReadOnly(false); _ac = "insert"; cc = new Book.Model.CustomerContact(); this.simpleButtonAdd.Enabled = false; this.simpleButtonSave.Enabled = true; this.simpleButtonModify.Enabled = false; this.simpleButtonDel.Enabled = false; this.simpleButtonUndo.Enabled = true; }
private void gridView1_Click(object sender, EventArgs e) { GridView view = sender as GridView; GridHitInfo hitInfo = view.CalcHitInfo(view.GridControl.PointToClient(Cursor.Position)); if (hitInfo.InRow && !view.IsGroupRow(hitInfo.RowHandle)) { cc = this.bindingSourceCustomsContact.Current as Model.CustomerContact; if (cc != null) { this.textEditEmail.Text = cc.CustomerContactEmail; this.textEditMobile.Text = cc.CustomerContactMobile; this.textEditName.Text = cc.CustomerContactName; this.textEditPhone.Text = cc.CustomerContactPhone; this.memoEditRemarks.Text = cc.CustomerContactRemark; } } }
private void simpleButtonModify_Click(object sender, EventArgs e) { //if (action != "view") //{ cc = this.bindingSourceCustomsContact.Current as Model.CustomerContact; if (cc != null) { SetTextEditReadOnly(false); _ac = "modify"; this.simpleButtonAdd.Enabled = false; this.simpleButtonDel.Enabled = false; this.simpleButtonModify.Enabled = false; this.simpleButtonSave.Enabled = true; this.simpleButtonUndo.Enabled = true; this.textEditEmail.Text = cc.CustomerContactEmail; this.textEditMobile.Text = cc.CustomerContactMobile; this.textEditName.Text = cc.CustomerContactName; this.textEditPhone.Text = cc.CustomerContactPhone; this.memoEditRemarks.Text = cc.CustomerContactRemark; } //} }
public void Update(Model.CustomerContact e) { this.Update <Model.CustomerContact>(e); }
public void Insert(Model.CustomerContact e) { this.Insert <Model.CustomerContact>(e); }