Beispiel #1
0
        public bool InsertSells(SellsDetail sellsDetail)
        {
            SqlCommand cmd = GetCommand("spInsertSells");

            cmd.Parameters.AddWithValue("@SellsDate", sellsDetail.SellsDate);
            cmd.Parameters.AddWithValue("@Details", sellsDetail.Details);
            cmd.Parameters.AddWithValue("@VehicleId", sellsDetail.VehicleId);
            cmd.Parameters.AddWithValue("@Amount", sellsDetail.Amount);
            cmd.Parameters.AddWithValue("@WarehourseId", sellsDetail.WarehouseId);
            int rowAffected = cmd.ExecuteNonQuery();

            con.Close();
            return(rowAffected > 0 ? true : false);
        }
Beispiel #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            SellsDetail sellsDetail = new SellsDetail();

            sellsDetail.Amount      = Convert.ToDecimal(txtSellAmount.Text);
            sellsDetail.Details     = txtDetails.InnerText;
            sellsDetail.SellsDate   = Convert.ToDateTime(RadSellDate.SelectedDate);
            sellsDetail.VehicleId   = Convert.ToInt16(ddlVehicle.SelectedValue);
            sellsDetail.WarehouseId = Convert.ToInt16(ddlWareHourse.SelectedValue);
            ServiceLayer serviceLayer = new ServiceLayer();

            if (serviceLayer.InsertSells(sellsDetail))
            {
                txtSellAmount.Text       = "";
                txtDetails.InnerText     = "";
                RadSellDate.SelectedDate = DateTime.Today;
            }

            GetSellsDetails();
        }
Beispiel #3
0
 public bool InsertSells(SellsDetail sellsDetail)
 {
     return(repository.InsertSells(sellsDetail));
 }