示例#1
0
        public JsonResult CountBySelection(ProductionControl productionControl)
        {
            string where = " 1=1 ";
            string where_MachineID       = "";
            string where_ProgramName     = "";
            string where_PdtCtrlDateTime = "";

            if (!string.IsNullOrEmpty(productionControl.MachineID))
            {
                where_MachineID = " and MachineID = '" + productionControl.MachineID + "'";
            }
            if (!string.IsNullOrEmpty(productionControl.ProgramName))
            {
                where_ProgramName = " and ProgramName  = '" + productionControl.ProgramName + "' ";
            }
            if (productionControl.PdtCtrlDateTime != null)
            {
                where_PdtCtrlDateTime = " and PdtCtrlDateTime = '" + productionControl.PdtCtrlDateTime + "' ";
            }
            where += where_MachineID + where_ProgramName + where_PdtCtrlDateTime;

            return(Json(productionConTrolDB.CountBySelection(where), JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public JsonResult Update(ProductionControl productionControl)
 {
     return(Json(productionConTrolDB.Insert(productionControl), JsonRequestBehavior.AllowGet));
 }