Ejemplo n.º 1
0
        public string GetProductLineData()
        {
            DCSAlarmService service = new DCSAlarmService();

            DataTable dt = service.GetProductLine();

            string[] column = { "ID", "Name" };
            string   result = ComboboxJsonParser.DataTableToJson(dt, column);

            return(result);
        }
Ejemplo n.º 2
0
        public string GetStaffInfoForCombobox()
        {
            WorkingTeamService service = new WorkingTeamService();

            DataTable dt = service.GetStaffInfo();

            string[] column = { "ID", "Name" };

            string result = ComboboxJsonParser.DataTableToJson(dt, column);

            return(result);
        }
Ejemplo n.º 3
0
        public string GetProductLineDatas()
        {
            WorkingSectionService service = new WorkingSectionService();
            DataTable             dt      = service.GetProductLine();

            string[] column = { "ID", "Name" };
            string   result = ComboboxJsonParser.DataTableToJson(dt, column);

            //Context.Response.Write(result);

            return(result);
        }
Ejemplo n.º 4
0
        public void GetStaffInfoWithComboboxFormat()
        {
            DataTable dt = StaffService.GetStaffInfo();

            dt.Columns["ID"].ColumnName   = "StaffID";
            dt.Columns["Name"].ColumnName = "StaffName";
            dt.Columns.Add("Combined");
            foreach (DataRow dr in dt.Rows)
            {
                dr["Combined"] = dr["StaffID"] + "  " + dr["StaffName"];
            }
            Context.Response.Write(ComboboxJsonParser.DataTableToJson(dt, "StaffID", "StaffName", "Combined"));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获得分厂ID和名字
        /// </summary>
        /// <returns></returns>
        public string GetFactory()
        {
            ComplexQuery query = new ComplexQuery();

            query.AddNeedField("Factory", "ID");
            query.AddNeedField("Factory", "Name");
            DataTable dt = dataFactory.Query(query);

            if (dt.Rows.Count == 0)
            {
                throw new Exception("查无数据");
            }
            return(ComboboxJsonParser.DataTableToJson(dt, "ID", "Name"));
        }
Ejemplo n.º 6
0
        public string GetmastersDatas(string ProductLineID)
        {
            int id = 0;

            int.TryParse(ProductLineID, out id);

            MasterConfigureService service = new MasterConfigureService();
            DataTable dt = service.GetMaser(id);

            string[] column = { "VariableName", "EquipmentName" };
            string   result = ComboboxJsonParser.DataTableToJson(dt, column);

            return(result);
        }
Ejemplo n.º 7
0
        public string GetEletricalRoom(int factoryId)
        {
            try
            {
                string connString             = ConnectionStringFactory.GetConnectionStringByFactoryID(factoryId, DatabaseType.EnergyDatabase);
                ISqlServerDataFactory factory = new SqlServerDataFactory(connString);

                ComplexQuery query = new ComplexQuery();
                query.AddNeedField("ElectricalRoom", "ID");
                query.AddNeedField("ElectricalRoom", "Name");
                DataTable dt = factory.Query(query);

                return(ComboboxJsonParser.DataTableToJson(dt, "ID", "Name"));
            }
            catch
            {
                return("[]");
            }
        }
Ejemplo n.º 8
0
        public string GetWorkingTeamWithComboboxFormat(int productLineId)
        {
            DataTable dt = StaffService.GetWorkingTeamByProductLineId(productLineId);

            return(ComboboxJsonParser.DataTableToJson(dt, "ID", "ChargeManID", "Name"));
        }
Ejemplo n.º 9
0
        public void GetMachineHaltReasonWithComboboxFormat()
        {
            DataTable dt = MachineHaltLogService.GetMachineHaltReason();

            Context.Response.Write(ComboboxJsonParser.DataTableToJson(dt, "ID", "Name"));
        }
Ejemplo n.º 10
0
        public string GetAvailableFormulaGroupWithComboboxFormat(int productLineId)
        {
            DataTable dt = ElectricPowerCountService.GetAvailableFormulaGroupByProductLineId(productLineId);

            return(ComboboxJsonParser.DataTableToJson(dt, "Name", "FormulaGroupID"));
        }
Ejemplo n.º 11
0
        public void GetProductLinesWithComboboxFormat()
        {
            DataTable productLineTable = ProductLineService.GetProductLines();

            Context.Response.Write(ComboboxJsonParser.DataTableToJson(productLineTable, "ID", "Name"));
        }