Beispiel #1
0
        public int DeleteConsultantPayment(Model.Pathology service)
        {
            int count = 0;

            Command             = new SqlCommand("Delete tblConsultantPayment where VoucherNo= @VoucherNo ", Connection);
            Command.CommandType = CommandType.Text;
            Command.Parameters.AddWithValue("@VoucherNo", service.VoucherNo);
            count += Command.ExecuteNonQuery();

            return(count);
        }
Beispiel #2
0
        public int UpdateConsultantPayment(Model.Pathology service)
        {
            int count = 0;

            Command             = new SqlCommand("Update tblConsultantPayment set Date= @Date,Particulars=@Particulars,Amount=@Amount,Description=@Description,UserId=@UserId,InWord=@InWord where VoucherNo= @VoucherNo ", Connection);
            Command.CommandType = CommandType.Text;
            Command.Parameters.AddWithValue("@VoucherNo", service.VoucherNo);
            Command.Parameters.AddWithValue("@Date", service.Date);
            Command.Parameters.AddWithValue("@Particulars", service.Particulars);
            Command.Parameters.AddWithValue("@Amount", service.Amount);
            Command.Parameters.AddWithValue("@Description", service.Description);
            Command.Parameters.AddWithValue("@UserId", service.UserId);
            Command.Parameters.AddWithValue("@InWord", service.Inword);
            count += Command.ExecuteNonQuery();

            return(count);
        }
Beispiel #3
0
        public int SaveConsultantPayment(Model.Pathology service)
        {
            int count = 0;

            Command = new SqlCommand("INSERT INTO tblConsultantPayment (VoucherNo,Date,Particulars,Amount,Description,UserId,InWord)"
                                     + "VALUES(@VoucherNo,@Date,@Particulars,@Amount,@Description,@UserId,@InWord)", Connection);
            Command.CommandType = CommandType.Text;
            Command.Parameters.AddWithValue("@VoucherNo", service.VoucherNo);
            Command.Parameters.AddWithValue("@Date", service.Date);
            Command.Parameters.AddWithValue("@Particulars", service.Particulars);
            Command.Parameters.AddWithValue("@Amount", service.Amount);
            Command.Parameters.AddWithValue("@Description", service.Description);
            Command.Parameters.AddWithValue("@UserId", MainWindow.userName);
            Command.Parameters.AddWithValue("@InWord", service.Inword);
            count += Command.ExecuteNonQuery();

            return(count);
        }