Esempio n. 1
0
 protected void Submit_Click(object sender, EventArgs e)
 {
     try
     {
         Oplitis myOplitis = new Oplitis();
         BLayer  myBlayer  = new BLayer();
         myOplitis.id           = Convert.ToInt32(oplitisid.Text);
         myOplitis.metaboli     = Convert.ToDateTime(metaboliDate.Text);
         myOplitis.asm          = Int32.Parse(asm.Text);
         myOplitis.onoma        = fname.Text;
         myOplitis.eponymo      = lname.Text;
         myOplitis.loxos        = loxos.Text;
         myOplitis.bathmos      = DropDownListRank.SelectedItem.ToString();
         myOplitis.paratiriseis = paratiriseis.Text;
         myOplitis.isxysDate    = Convert.ToDateTime(isxysKatigorias.Text);
         if (string.IsNullOrEmpty(newKatigoria.Text))
         {
             myOplitis.katigoria = currentKatigoria.Text;
         }
         else
         {
             myOplitis.katigoria = newKatigoria.Text;
         }
         myBlayer.updateOplitis(myOplitis);
         Response.Redirect("anafora_metabolis.aspx");
     }
     catch (Exception ex)
     {
         errorMessage.Visible = true;
         errorMessage.Text    = ex.Message.ToString();
     }
 }