private void btnSave_Click(object sender, EventArgs e) { //string sErr = ""; DTO.POGInfo inf = new DTO.POGInfo(); if (_processStatus == "C") { if (!ctr.IsExist(txtCode.Text)) { ctr.Add(GetDataFromForm(inf), ref _sErr); } else { _sErr = txtCode.Text.Trim() + " is exist!"; } } else if (_processStatus == "A") { _sErr = ctr.InsertUpdate(GetDataFromForm(inf)); } if (_sErr == "") { _processStatus = "V"; EnabledForm(false); } else { lbErr.Text = _sErr; } }
private void SetDataToForm(DTO.POGInfo obj) { txtCode.Text = obj.ROLE_ID; txtName.Text = obj.ROLE_NAME; txtLen.Text = obj.PASS_MIN_LEN; txtQD.Text = obj.RPT_CODE; txtValid.Text = obj.PASS_VALID; }
private DTO.POGInfo GetDataFromForm(DTO.POGInfo obj) { //DTO.PODInfo obj = new DTO.PODInfo(); obj.ROLE_ID1 = obj.ROLE_ID = txtCode.Text; obj.ROLE_NAME = txtName.Text; obj.PASS_MIN_LEN = txtLen.Text; obj.PASS_VALID = txtValid.Text; obj.RPT_CODE = txtQD.Text; obj.TB = "POG"; return(obj); }
private object CalculateDetailValue(GridEXRow gridEXRow) { BUS.POGControl ctr = new BUS.POGControl(); DTO.POGInfo inf = ctr.Get(gridEXRow.Cells["Code"].Value.ToString(), ref _sErr); return(inf.ROLE_NAME); }