Exemplo n.º 1
0
        private void btn_cashcolupdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (commonFunctions.ToInt(lbl_breakdid.Text.ToString()) <= 0)
                {
                    MessageBox.Show("Please select a record to delete", Messaging.MessageCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                if (MessageBox.Show("Do you want to Delete this record?", Messaging.MessageCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    CustomeRepository.RemoveCollectionBreakdown(commonFunctions.ToInt(lbl_breakdid.Text.ToString()));
                    GetTotalForPumperForGivenDay(commonFunctions.ToInt(lbl_salesID.Text.ToString()));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Has found when Saving data. Please forword following details to technical" + Environment.NewLine + "[" + ex.Message + Environment.NewLine + ex.Source + "]", Messaging.MessageCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            //
        }