/// <summary> /// Edit Function /// </summary> public void EditFunction() { try { SizeSP spSize = new SizeSP(); SizeInfo infoSize = new SizeInfo(); infoSize.Size = txtSize.Text.Trim(); infoSize.Narration = txtNarration.Text.Trim(); infoSize.Extra1 = String.Empty; infoSize.Extra2 = String.Empty; infoSize.SizeId = decSizeId; if (spSize.SizeNameCheckExistence(txtSize.Text.Trim().ToString(), decSizeId) == false) { if (spSize.SizeEditing(infoSize)) { Messages.UpdatedMessage(); GridFill(); Clear(); } } else { Messages.InformationMessage("Size already exist"); txtSize.Focus(); } } catch (Exception ex) { MessageBox.Show("SZ3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to Update values in Size Table and return the status /// </summary> /// <param name="infoSize"></param> /// <returns></returns> public bool SizeEditing(SizeInfo infoSize) { bool isEdit = false; try { isEdit = spSize.SizeEditing(infoSize); } catch (Exception ex) { MessageBox.Show("SZ4:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(isEdit); }