Пример #1
0
 public void Start(string loca)
 {
     //data = new Database();
     data.Location =loca;
     data = new Database();
     data.Ccon();
     getAll(0);
 }
Пример #2
0
        void StartCconClick(object sender, EventArgs e)
        {
            // TODO: Implement StartCconClick

            data = new Database();

            data.Ccon();
            getAll(0);
        }
Пример #3
0
 public void Start()
 {
     data = new Database();
     data.Ccon();
     getAll(0);
 }
Пример #4
0
        void Save()
        {
            if( /*batchNum.Text.Equals("") ||medAmount.Text =="" ||*/ comboType.Text.Equals("")||comboYear.Text.Equals("")||comboMonth.Text.Equals("")|| medName.Text.Equals("")  )
            {}
            else if(comboType.Text=="others" && textboxOther.Text=="")
            {
                textboxOther.Select();
            }
            else{

                Thread prgThead = new Thread(StarProg);
                prgThead.Start();
            Database a= new Database();
            int amount = f.AddInt(medAmount.Text);
            string typeSelect=null;
            if(comboType.Text=="others"){
            typeSelect= textboxOther.Text;
            }else{

                typeSelect=comboType.Text;
            }
            string dateType=null;

            if(dayNumber.Text=="0" || dayNumber.Enabled==false){

                dateType =comboYear.Text+@"/"+comboMonth.Text+@"/"+f.getLastDayOfMonth(comboMonth.Text);

            }
            else{

                string addZero=dayNumber.Text;
                if(dayNumber.Value<10){
                    addZero="0"+dayNumber.Text;
                }
                else{}
                 dateType =comboYear.Text+@"/"+comboMonth.Text+@"/"+addZero ;
            }
            a.Ccon();
            a.Add(batchNum.Text,medName.Text,typeSelect,f.CheckDateBeforeAdd(dateType),amount ,note.Text);

            forms.getAll(0);
            forms.DisableSelect();
            this.Activate();

            }
        }