private void SetData(JZone Zone) { Zone.Code = Code; Zone.Address = txtAdress.Text.Trim(); Zone.Description = txtDisc.Text.Trim(); Zone.Name = txtName.Text.Trim(); Zone.Tel = txtTel.Text.Trim(); }
private void Load1(int PCode) { JZone objZone = new JZone(); objZone.GetData(PCode); txtAdress.Text = objZone.Address; txtDisc.Text = objZone.Description; txtName.Text = objZone.Name; txtTel.Text = objZone.Tel; }
private int Save() { JZone objAutoDefine = new JZone(); SetData(objAutoDefine); if (State == ClassLibrary.JFormState.Insert) { Code = objAutoDefine.Insert(); } else if (State == ClassLibrary.JFormState.Update) { objAutoDefine.Update(); } State = ClassLibrary.JFormState.Update; ClassLibrary.JSystem.Nodes.RefreshDataTable(); return(Code); }