Ejemplo n.º 1
0
        private void linkLabel27_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Material_verifyForRelease MRI = new Material_verifyForRelease();

            MRI.GetUserID(TxtUserID.Text);
            MRI.GetTranType("TRP");
            MRI.Show();
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string        StringReturn = "";
            SqlConnection con          = new SqlConnection(conStr);
            SqlCommand    cmd          = new SqlCommand();

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.CommandText = "TRAN_RejectInventoryTransfer";
            cmd.Parameters.Add("@MRIID", SqlDbType.Int).Value = Convert.ToInt32(txtMRIID.Text);

            cmd.Connection = con;
            try
            {
                con.Open();
                StringReturn = cmd.ExecuteScalar().ToString();
                if (StringReturn == "Approved")
                {
                    MessageBox.Show("This Request is already approved!.", "Error", MessageBoxButtons.OK,
                                    MessageBoxIcon.Exclamation,
                                    MessageBoxDefaultButton.Button1);
                }
                else
                {
                    MessageBox.Show("Request has been rejected", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    Material_verifyForRelease formTask = new Material_verifyForRelease();
                    formTask.GetUserID(TxtUserID.Text);
                    formTask.GetTranType(txttrantype.Text);
                    this.Dispose();
                    formTask.Show();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                con.Close();
                con.Dispose();
            }
        }