示例#1
0
        private void button17_Click(object sender, EventArgs e)
        {
            StallionSuppyChain.Procurement.MaterialRequestIquiry ItemMaster2 = new StallionSuppyChain.Procurement.MaterialRequestIquiry();
            ItemMaster2.GetUserID(TxtUserID.Text);
            ItemMaster2.Show();

            //ItemMasterLookUp ItemMasterLookUp1 = new ItemMasterLookUp();
            //ItemMasterLookUp1.ShowDialog();
            // ItemMasterLookUp TEST = new ItemMasterLookUp();
        }
 private void MaterialRequestMain_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (txtForApproval.Text == "")
     {
         MaterialRequestIquiry formTask = new MaterialRequestIquiry();
         formTask.GetUserID(TxtUserID.Text);
         this.Dispose();
         formTask.Show();
     }
     if (txtForApproval.Text == "true")
     {
         MaterialRequestForApproval formTask = new MaterialRequestForApproval();
         formTask.GetUserID(TxtUserID.Text);
         this.Dispose();
         formTask.Show();
     }
     if (txtForApproval.Text == "MRI")
     {
         Material_Releasing_Inquiry formTask = new Material_Releasing_Inquiry();
         formTask.GetUserID(TxtUserID.Text);
         this.Dispose();
         formTask.Show();
     }
 }
        private void TranSaveHeader(int processID, string Action)
        {
            string StringReturn = "";
            string status       = "";

            if (Action == "SAVE" || Action == "ADDNEW")
            {
                status = "Open";
            }
            if (Action == "SUBMIT")
            {
                status = "Submitted";
            }

            SqlConnection con = new SqlConnection(conStr);
            SqlCommand    cmd = new SqlCommand();

            cmd.CommandType = CommandType.StoredProcedure;

            cmd.CommandText = "TRAN_SAVEMaterialRequest";

            cmd.Parameters.Add("@ProcurementID", SqlDbType.VarChar).Value = cboCategoryType.SelectedValue.ToString();
            cmd.Parameters.Add("@ProjectID", SqlDbType.Int).Value         = Convert.ToInt32(cboProjectCode.SelectedValue.ToString());
            cmd.Parameters.Add("@status", SqlDbType.VarChar, 15).Value    = status;
            cmd.Parameters.Add("@ForPurchase", SqlDbType.Bit).Value       = ckpurchase.CheckState;
            cmd.Parameters.Add("@DateNeeded", SqlDbType.DateTime).Value   = Convert.ToDateTime(dateTimePicker4.Value.ToString());
            cmd.Parameters.Add("@Requestedby", SqlDbType.Int).Value       = Convert.ToInt32(cborquestedby.SelectedValue.ToString());
            cmd.Parameters.Add("@Recomendedby", SqlDbType.Int).Value      = Convert.ToInt32(cboRecomendedby.SelectedValue.ToString());
            cmd.Parameters.Add("@DelivedTo", SqlDbType.Int).Value         = Convert.ToInt32(cboDeleveredto.SelectedValue.ToString());
            cmd.Parameters.Add("@UserCreated", SqlDbType.Int).Value       = Convert.ToInt32(TxtUserID.Text);
            cmd.Parameters.Add("@Approvedby", SqlDbType.Int).Value        = Convert.ToInt32(cboApproveby.SelectedValue.ToString());
            cmd.Parameters.Add("@MRMNo", SqlDbType.VarChar, 50).Value     = TXTMRMNO.Text;
            cmd.Parameters.Add("@ProcessID", SqlDbType.Int).Value         = processID;

            cmd.Connection = con;
            try
            {
                con.Open();
                StringReturn = cmd.ExecuteScalar().ToString();
                if (Action == "SAVE" || Action == "SUBMIT")
                {
                    MessageBox.Show("Record Saved", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    btnSave.Enabled = false;
                    MaterialRequestIquiry formTask2 = new MaterialRequestIquiry();
                    formTask2.GetUserID(TxtUserID.Text);
                    this.Dispose();
                    formTask2.Show();
                }

                ItemMasterLookUp formTask = new ItemMasterLookUp();

                if (Action == "ADDNEW")
                {
                    formTask.Test(StringReturn, "MRM");
                    formTask.GetUserID(TxtUserID.Text);
                    this.Dispose();
                    formTask.Show();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                con.Close();
                con.Dispose();
            }
        }
示例#4
0
 private void linkLabel22_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     StallionSuppyChain.Procurement.MaterialRequestIquiry ItemMaster2 = new StallionSuppyChain.Procurement.MaterialRequestIquiry();
     ItemMaster2.GetUserID(TxtUserID.Text);
     ItemMaster2.Show();
 }