void DoSave() { if (DoValidate())return; var bl = new StoreManager { storecode = storecode.Text, storetype = storetype.EditValue.ToString(), storename = storename.Text, address = address.Text, phono = phoneno.Text, fax = fax.Text, communicationtype = int.Parse(radioGroup1.EditValue.ToString()), COMPANY = lookupcompany.EditValue.ToString() }; var retval = bl.DoSave(); if(retval=="1") { storecode.Text = bl.storecode; XtraMessageBox.Show("Data saved sucessfully", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); RibbonSaveEnable = false; RibbonPageEdit = false; } else { XtraMessageBox.Show(retval, "POS", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void UpLoadInventory() { var whid = lookupfrom.EditValue.ToString(); var s = new StoreManager().GetStoreType(whid); string storetype = "S"; if (s.IndexOf("S") == -1) { storetype = "P"; } var s1 = new YearEndClass().DoUpdateInventory(_dsyearend, storetype, whid); if (s1 == "1") { XtraMessageBox.Show("Inventory Updated", "POS", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { XtraMessageBox.Show(s1, "POS", MessageBoxButtons.OK, MessageBoxIcon.Error); } }