Beispiel #1
0
        private void btn_Write_Click(object sender, EventArgs e)
        {
            if (t == null)
            {
                MessageBox.Show("측정항목을 선택해주세요.", "알림");
            }
            else
            {
                InsertCon_Vo vo = new InsertCon_Vo();
                vo.Condition_Val   = Convert.ToDecimal(txt_MeasuredValue.Text);
                vo.Item_Name       = txt_Item.Text;
                vo.Wc_Name         = txt_WorkPlace.Text;
                vo.Workorderno     = cb_WorkNum.Text;
                vo.Condition_Group = t.ToString();
                InsertCon_Service service = new InsertCon_Service();
                service.InsertInspect(vo);
                txt_MeasuredValue.Text = "";
                MessageBox.Show("입력완료", "알림");
                SetVal();
            }


            //Inspect_Service service = new Inspect_Service();
            //Inspect_Vo vo = new Inspect_Vo();
            //vo.Item_Name = d;
            //vo.Inspect_Val = Convert.ToDecimal(txt_MeasuredValue.Text);

            //service.InsertInspect(vo);

            //MessageBox.Show("입력 완료");
        }
Beispiel #2
0
        private void SetVal()
        {
            InsertCon_Service service = new InsertCon_Service();
            InsertCon_Vo      vo      = new InsertCon_Vo();

            vo.Item_Name             = txt_Item.Text;
            vo.Wc_Name               = txt_WorkPlace.Text;
            vo.Condition_Group       = t.ToString();
            dataGridView2.DataSource = service.GetConditionVal(vo);
        }
Beispiel #3
0
        public List <InsertCon_Vo> GetConditionVal(InsertCon_Vo item)
        {
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.Connection  = new SqlConnection(this.ConnectionString);
                cmd.CommandText = "GetConditionVal";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Item_Name", item.Item_Name);

                cmd.Parameters.AddWithValue("@Wc_Name", item.Wc_Name);
                cmd.Parameters.AddWithValue("@Condition_Group", item.Condition_Group);


                cmd.Connection.Open();
                SqlDataReader       reader = cmd.ExecuteReader();
                List <InsertCon_Vo> list   = Helper.DataReaderMapToList <InsertCon_Vo>(reader);
                cmd.Connection.Close();

                return(list);
            }
        }
        public List <InsertCon_Vo> GetConditionVal(InsertCon_Vo item)
        {
            InsertCon_Dac dac = new InsertCon_Dac();

            return(dac.GetConditionVal(item));
        }
        public List <InsertCon_Vo> InsertInspect(InsertCon_Vo item)
        {
            InsertCon_Dac dac = new InsertCon_Dac();

            return(dac.InsertInspect(item));
        }