Ejemplo n.º 1
0
        public bool AddStudioManager(StudioManager sm)
        {
            bool result = false;

            query = "INSERT INTO game (game_title, slot_type, upd_n, platform, local_producer, hq_prod, local_deadline, ios_deadline) VALUES('" + sm.m_GameTitle + "','" + sm.m_ProjectType + "','" + sm.m_EvolutionUpdate + "','" + sm.m_PlatformType + "','" + sm.m_LocalProducer + "','" + sm.m_HqProducer + "','" + sm.m_LocalDeadline + "','" + sm.m_IosDeadline + "')";

            try
            {
                connect.Open();
                cmd = new MySqlCommand(query, connect);
                cmd.ExecuteNonQuery();
                result = true;
            }
            catch (MySqlException ex)
            {
                MessageBox.Show(ex.Message.ToString());
                result = false;
            }
            finally
            {
                connect.Close();
            }

            return result;
        }
Ejemplo n.º 2
0
        public bool AddResourceAllocation(StudioManager sm)
        {
            bool result = false;

            query = "INSERT INTO resources (prod_id, prg_alloc, qa_alloc, gd_alloc, gfx_alloc) VALUES('" + sm.m_ProdId + "'," + sm.m_PrgAlloc + "," + sm.m_QaAlloc + "," + sm.m_GdAlloc + "," + sm.m_GfxAlloc + ")";

            try
            {
                connect.Open();
                cmd = new MySqlCommand(query, connect);
                cmd.ExecuteNonQuery();
                result = true;
            }
            catch (MySqlException ex)
            {
                MessageBox.Show(ex.Message.ToString());
                result = false;
            }
            finally
            {
                connect.Close();
            }

            return result;
        }
Ejemplo n.º 3
0
        private void btn_AddAlloc_Click(object sender, EventArgs e)
        {
            s_StudioManager = new StudioManager(cmb_Producer.SelectedValue.ToString(), int.Parse(txt_PrgAlloc.Text.ToString()), int.Parse(txt_QaAlloc.Text.ToString()), int.Parse(txt_GdAlloc.Text.ToString()), int.Parse(txt_GfxAlloc.Text.ToString()));

            if (s_SMManager.AddResourceAllocation(s_StudioManager))
            {
                MessageBox.Show("Succesfully added", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ClearFieldRes();
            }
            else
            {
                MessageBox.Show("Failed to add", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 4
0
        private void btnSMSubmit_Click(object sender, EventArgs e)
        {
            s_StudioManager = new StudioManager(txtSM_GameTitle.Text.ToString(), isClickProject(), isClickPlatform(), int.Parse(txtSM_EvolutionUpd.Text.ToString()), cmbSM_LocalProd.SelectedItem.ToString(), txtSM_HQProd.Text.ToString(), dtp_LocalDeadline.Text.ToString(), dtp_iOSDeadline.Text.ToString());

               if (s_SMManager.AddStudioManager(s_StudioManager))
               {
               MessageBox.Show("Succesfully added", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
               ClearField();
               }
               else
               {
               MessageBox.Show("Failed to add", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
               }
        }