Esempio n. 1
0
        protected void salvarButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (nomeTextBox1.Text != "" && autorTextBox1.Text != "")
                {
                    CDController salva = new CDController();
                    CD           cd    = new CD();

                    cd.Nome         = nomeTextBox1.Text;
                    cd.Autor        = autorTextBox1.Text;
                    cd.Data_Criacao = Convert.ToDateTime(dataTextBox2.Text);

                    salva.Inserir(cd);

                    nomeTextBox1.Text  = string.Empty;
                    autorTextBox1.Text = string.Empty;
                    dataTextBox2.Text  = string.Empty;


                    salvaLabel.Text = "salvo com sucesso!";
                }
                else
                {
                    salvaLabel.Text = "Possui alguns campos vazios! ";
                }
                nomeTextBox1.Text  = String.Empty;
                autorTextBox1.Text = String.Empty;
            }

            catch (Exception ex)
            {
                salvaLabel.Text = ex.Message;
            }
        }
        public virtual ActionResult Update(CDController entity)
        {
            entity.LastUpdatedTime = DateTime.Now;
            OperationResult or = CDControllerService.Update(entity);

            return(this.JsonFormat(or));
        }
Esempio n. 3
0
        protected void excluirCDLinkButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (exluirrCDTextBox2.Text != "")
                {
                    CDController excluirCD = new CDController();
                    CD           exCD      = new CD();

                    exCD.Cd_Id = Convert.ToInt32(exluirrCDTextBox2.Text);
                    excluirCD.Excluir(exCD.Cd_Id);


                    statusexcluirLabel1.Text = "Excluido com sucesso";
                }
                else
                {
                    exluirrCDTextBox2.Text = "ID NÃO CONFERE!";
                }
            }
            catch (Exception ex)
            {
                statusexcluirLabel1.Text = ex.Message;
            }
        }
        protected void excluirCDLinkButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (exluirrCDTextBox2.Text != "")
                {
                    CDController excluirCD = new CDController();
                    CD           exCD      = new CD();

                    exCD.Cd_Id = Convert.ToInt32(exluirrCDTextBox2.Text);
                    excluirCD.Excluir(exCD.Cd_Id);

                    statusLabel1.Text = "Excluido com sucesso com sucesso!";
                }
                else
                {
                    statusLabel1.Text = "ERRO NO ID";
                }
            }


            catch (Exception)
            {
                statusLabel1.Text = "Não foi reconhecido o Caracter";
            }
        }
Esempio n. 5
0
 void Start()
 {
     controller    = this.gameObject.GetComponent <CDController>();
     myRigidbody   = this.gameObject.GetComponent <Rigidbody>();
     gunController = this.gameObject.GetComponent <CDGunController>();
     viewCamera    = Camera.main;
 }
Esempio n. 6
0
 private void Start()  // Basically Launch
 {
     cdc = FindObjectOfType <CDController>();
     GetMousePosLook();
     SetLaunchAngle();
     Launch();
 }
Esempio n. 7
0
        static void Main(string[] args)
        {
            CDController manager = new CDController();

            //string input;
            Console.WriteLine("Welcome to the CD Manager!");

            while (true)
            {
                manager.run();
            }
        }
    protected override void OnStart()
    {
        uiLayer             = UIPanelLayers.BackgroundLayer;
        joystick            = Find <ETCJoystick>("PlayerJoystick");
        skillCDController01 = panelObj.AddComponent <CDController>();
        PlayerSkillManager skillManager = GameWorld.thePlayer.skillManager as PlayerSkillManager;

        skillCDController01.SetCDContent(Find <Image>("Skill1/ButtonAttack1/CDMask"), Find <Text>("Skill1/ButtonAttack1/CDText"), skillManager.GetSpellOneID(), skillManager);
        skillCDController01.IsRun = true;


        skillCDController02 = panelObj.AddComponent <CDController>();
        skillCDController02.SetCDContent(Find <Image>("Skill2/ButtonAttack2/CDMask"), Find <Text>("Skill2/ButtonAttack2/CDText"), skillManager.GetSpellTwoID(), skillManager);
        skillCDController02.IsRun = true;
    }
Esempio n. 9
0
        protected void editarButton1_Click(object sender, EventArgs e)
        {
            try
            {
                CDController edit   = new CDController();
                CD           editcd = new CD();
                editcd.Cd_Id        = Convert.ToInt32(alteraridcdTextBox1.Text);
                editcd.Nome         = editarnomecdTextBox1.Text;
                editcd.Autor        = editarautorcdTextBox1.Text;
                editcd.Data_Criacao = Convert.ToDateTime(editardatacdTextBox2.Text);

                edit.Atualizar(editcd);
                statuseditLabel1.Text = "Editado com Sucesso";
            }
            catch (Exception ex)
            {
                statuseditLabel1.Text = ex.Message;
            }
        }
Esempio n. 10
0
        static void Main(string[] args)
        {
            CDController start = new CDController();

            start.Run();
        }
        public virtual ActionResult Add(CDController entity)
        {
            OperationResult or = CDControllerService.Insert(entity);

            return(this.JsonFormat(or));
        }