Beispiel #1
0
        private void CaseUpdateForm_Load(object sender, EventArgs e)
        {
            lblDate.Text = orderDate.Date.ToShortDateString();
              CaseReport[] getMyInfo = CaseReport.CaseReport_GetByDates(orderDate.Date, orderDate.Date);
              theReport = getMyInfo[0];
              txtResmi.Text = theReport.ResmiAll.ToString();
              txtCompany.Text = theReport.GayriResmiAll.ToString();
              txtEarn.Text = theReport.Earn.ToString();
              txtNeccessary.Text = theReport.TotalMoney.ToString();

              lblTotalMoney.Text = (theReport.ResmiAll + theReport.GayriResmiAll + theReport.Earn).ToString();
        }
Beispiel #2
0
        public static CaseReport[] CaseReport_GetAll()
        {
            string query = "CaseReport_GetAll";

              DataTable dt = Connection.runQuery(query, new SqlParameter[0]);

              List<CaseReport> res = new List<CaseReport>();

              for (int i = 0; i < dt.Rows.Count; i++)
              {
            CaseReport tmp = new CaseReport();

            tmp.CreditCard = Convert.ToDecimal(dt.Rows[i]["CreditCard"].ToString());
            tmp.Description = dt.Rows[i]["Description"].ToString();
            tmp.Earn = Convert.ToDecimal(dt.Rows[i]["Earn"].ToString());
            tmp.GayriResmiAll = Convert.ToDecimal(dt.Rows[i]["GayriResmiAll"].ToString());
            tmp.Havale = Convert.ToDecimal(dt.Rows[i]["Havale"].ToString());
            tmp.OrderDoneDate = Convert.ToDateTime(dt.Rows[i]["OrderDoneDate"].ToString());
            tmp.ResmiAll = Convert.ToDecimal(dt.Rows[i]["ResmiAll"].ToString());
            tmp.Status = Convert.ToInt16(dt.Rows[i]["Status"].ToString());
            tmp.TotalCash = Convert.ToDecimal(dt.Rows[i]["TotalCash"].ToString());
            tmp.TotalMoney = Convert.ToDecimal(dt.Rows[i]["TotalMoney"].ToString());

            res.Add(tmp);
              }
              return res.ToArray();
        }