예제 #1
0
        public bool InsertUpdateDeleteJobEntry(ENT.JobEntry objENT)
        {
            bool row = false;

            try
            {
                sqlCMD             = new SqlCommand();
                sqlCMD.CommandText = "InsertUpdateDeleteJobEntry";
                sqlCMD.Parameters.AddWithValue("@JobID", objENT.JobID);
                sqlCMD.Parameters.AddWithValue("@JobNo", objENT.JobNo);
                sqlCMD.Parameters.AddWithValue("@JobFurnaceNo", objENT.JobFurnaceNo);
                sqlCMD.Parameters.AddWithValue("@StartTime", objENT.StartTime);
                sqlCMD.Parameters.AddWithValue("@EndTime", objENT.EndTime);
                sqlCMD.Parameters.AddWithValue("@Pour1Time", objENT.Pour1Time);
                sqlCMD.Parameters.AddWithValue("@Pour2Time", objENT.Pour2Time);
                sqlCMD.Parameters.AddWithValue("@Pour3Time", objENT.Pour3Time);
                sqlCMD.Parameters.AddWithValue("@Pour4Time", objENT.Pour4Time);
                sqlCMD.Parameters.AddWithValue("@Pour5Time", objENT.Pour5Time);
                sqlCMD.Parameters.AddWithValue("@Pour6Time", objENT.Pour6Time);
                sqlCMD.Parameters.AddWithValue("@IsFinish", objENT.IsFinish);
                sqlCMD.Parameters.AddWithValue("@Mode", objENT.Mode);
                row = objCRUD.InsertUpdateDelete(sqlCMD);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(row);
        }
예제 #2
0
        public void GetJobEntry()
        {
            try
            {
                ENT.JobEntry        objENT = new ENT.JobEntry();
                List <ENT.JobEntry> lstENT = new List <ENT.JobEntry>();
                if (checkBox1.Checked)
                {
                    objENT.Mode = "GetAllJobEntryToday";
                }
                else
                {
                    objENT.Mode            = "GetAllJobEntryByDate";
                    objENT.strJobStartTime = DAL.DBHelper.ChangeDate(dtpFromDate.Text);
                    objENT.strJobEndTime   = DAL.DBHelper.ChangeDate(dtpToDate.Text);
                    objENT.JobNo           = txtJobNo.Text.Trim();
                }

                lstENT = new DAL.JobEntry().GetJobEntry(objENT);
                dgvSales.DataSource = lstENT;

                dgvSales.Columns[0].HeaderText  = "JobID";
                dgvSales.Columns[0].Visible     = false;
                dgvSales.Columns[1].HeaderText  = "Job No";
                dgvSales.Columns[2].HeaderText  = "Job Furnace No";
                dgvSales.Columns[3].HeaderText  = "Start Time";
                dgvSales.Columns[4].HeaderText  = "End Time";
                dgvSales.Columns[5].HeaderText  = "Pour1 Time";
                dgvSales.Columns[6].HeaderText  = "Pour2 Time";
                dgvSales.Columns[7].HeaderText  = "Pour3 Time";
                dgvSales.Columns[8].HeaderText  = "Pour4 Time";
                dgvSales.Columns[9].HeaderText  = "Pour5 Time";
                dgvSales.Columns[10].HeaderText = "Pour6 Time";
                dgvSales.Columns[11].Visible    = false;
                dgvSales.Columns[12].Visible    = false;
                dgvSales.Columns[13].Visible    = false;
                dgvSales.Columns[14].HeaderText = "Job Status";
                dgvSales.Columns[15].Visible    = false;
                dgvSales.Columns[16].Visible    = false;
                dgvSales.AutoSizeColumnsMode    = DataGridViewAutoSizeColumnsMode.DisplayedCells;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #3
0
        public List <ENT.JobEntry> GetJobEntry(ENT.JobEntry objENT)
        {
            List <ENT.JobEntry> lstENT = new List <ENT.JobEntry>();

            try
            {
                sqlCMD             = new SqlCommand();
                sqlCMD.CommandText = "GetJobEntry";
                sqlCMD.Parameters.AddWithValue("@JobID", objENT.JobID);
                sqlCMD.Parameters.AddWithValue("@JobNo", objENT.JobNo);
                sqlCMD.Parameters.AddWithValue("@StartTime", objENT.strJobStartTime);
                sqlCMD.Parameters.AddWithValue("@EndTime", objENT.strJobEndTime);
                sqlCMD.Parameters.AddWithValue("@Mode", objENT.Mode);
                lstENT = DBHelper.GetEntityList <ENT.JobEntry>(sqlCMD);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lstENT);
        }