Beispiel #1
0
        public int InsertJobOrder(JobOrderCreateVo_Insert ins)
        {
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.Connection  = new SqlConnection(ConnectionString);
                cmd.CommandText = "insert into WorkOrder(Workorderno,Plan_Unit,Plan_Qty,Plan_Date,Item_Code,Wc_Code,Wo_Status) values (@Workorderno,@Plan_Unit,@Plan_Qty,@Plan_Date,@Item_Code,@Wc_Code,'대기')";
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.AddWithValue("@Workorderno", ins.workorderno);
                cmd.Parameters.AddWithValue("@Plan_Unit", ins.plan_unit);
                cmd.Parameters.AddWithValue("@Plan_Qty", ins.plan_qty);
                cmd.Parameters.AddWithValue("@Plan_Date", ins.plan_date);
                cmd.Parameters.AddWithValue("@Item_Code", ins.item_code);
                cmd.Parameters.AddWithValue("@Wc_Code", ins.wc_code);


                cmd.Connection.Open();
                int result = cmd.ExecuteNonQuery();
                return(result);
            }
        }
Beispiel #2
0
        public int UpdateJobOrder(JobOrderCreateVo_Insert ins)
        {
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.Connection  = new SqlConnection(ConnectionString);
                cmd.CommandText = "update WorkOrder set Plan_Unit=@Plan_Unit,Plan_Qty=@Plan_Qty,Plan_Date=@Plan_Date,Item_Code=@Item_Code,Wc_Code =@Wc_Code where Workorderno = @Workorderno";
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.AddWithValue("@Workorderno", ins.workorderno);
                cmd.Parameters.AddWithValue("@Plan_Unit", ins.plan_unit);
                cmd.Parameters.AddWithValue("@Plan_Qty", ins.plan_qty);
                cmd.Parameters.AddWithValue("@Plan_Date", ins.plan_date);
                cmd.Parameters.AddWithValue("@Item_Code", ins.item_code);
                cmd.Parameters.AddWithValue("@Wc_Code", ins.wc_code);


                cmd.Connection.Open();
                int result = cmd.ExecuteNonQuery();
                return(result);
            }
        }
        public int UpdateJobOrder(JobOrderCreateVo_Insert ins)
        {
            JobOrderDac dac = new JobOrderDac();

            return(dac.UpdateJobOrder(ins));
        }