Ejemplo n.º 1
0
 private void btn_Sure_Click(object sender, EventArgs e)
 {
     if (controller.Entry == null)
     {
         controller.LoadEntry();
         onExtractInputValue();
         if (controller.InsertEntry())
         {
             onInitialUI();
             controller.ReleaseEntry();
         }
         else
         {
             MessageBoxHelper.ShowCreateStateDialog(false);
         }
     }
     else
     {
         onExtractInputValue();
         if (controller.UpdateEntryByID())
         {
             onInitialUI();
             controller.ReleaseEntry();
         }
         else
         {
             MessageBoxHelper.ShowUpdateStateDialog(false);
         }
     }
 }
Ejemplo n.º 2
0
        private void Repo_HLE_Edit_Click(object sender, EventArgs e)
        {
            controller.CurrentID = gridHelper.getFocuseRowCellValue_Int(builder.ID);
            controller.LoadEntry();

            tv_Catalog.Text     = gridHelper.getFocuseRowCellValue_String(builder.CatalogName);
            tv_Description.Text = controller.Entry.Description;
            tv_Estimate.Text    = "" + controller.Entry.Estimate;
            tv_Name.Text        = controller.Entry.Name;
            tv_SignDate.Text    = controller.Entry.SignDate;

            tv_Actual.Text = "" + controller.Entry.Actuality;
            if (string.IsNullOrEmpty(controller.Entry.WeedDate) == false)
            {
                dateE_Weed.DateTime = DateTime.Parse(controller.Entry.WeedDate);
            }
            tv_DiiffReason.Text = controller.Entry.DifferentReason;

            simpleButton1.Enabled  = true;
            btn_RevokeWeed.Enabled = true;
        }