Esempio n. 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            BALAcknowledgement objBAL=new BALAcknowledgement(Program.AccountStatic.LoggingAsLocal);
            Acknoladgement _obj = new Acknoladgement();
            string respond = setData(out _obj);

            if (respond == "True")
            {
                respond = objBAL.Save(_obj);
                if (respond == "True")
                { MessageBox.Show("Saved"); }
                else
                {
                    MessageBox.Show("Save Failed");
                }
            }
        }
Esempio n. 2
0
        public string setData(out Acknoladgement obj)
        {
            obj = new Acknoladgement();

            try{
                obj.name = txtName.Text;
                obj.nic = txtNIC.Text;
                obj.tp = txtTP.Text;
                obj.chequeno = txtChequeNo.Text;
                obj.voucherno = txtVoucherNo.Text;
                obj.savedate = dateTimePicker1.Text;
                return "True";
             }
            catch (Exception ex)
            {
                return ex.Message;
            }
            
        }