示例#1
0
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.ItemSelect)
                {
                    DialogResult dr = MessageBox.Show(this, "Are you sure you want received selected Material Requisition?\n\nClick Yes to Receive", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                    if (dr == DialogResult.Yes)
                    {
                        objMR.MRReceivedBy = CurrentUser.UserEmp.EmployeeID;
                        objMR.MRStatus     = MR.Status.Recevied;

                        int x = objMRDL.Update_Received(objMR);

                        Load_MRList();
                        Load_MRItem();
                    }
                }
                else
                {
                    MessageBox.Show(this, "Please Select a Material Requition", "Selection Empty", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "Error occured while Receiving", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }