コード例 #1
0
        /// <summary>
        /// 插入前缀表
        /// </summary>
        /// <param name="list"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int insertProjectorInformation_EncodingRulesDal(List <ProjectorInformation_EncodingRules> list, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@TypeName", SqlDbType.VarChar, 50)
                {
                    Value = list[0].TypeName
                },
                new SqlParameter("@Prefix_BodyCode", SqlDbType.VarChar, 50)
                {
                    Value = list[0].Prefix_BodyCode
                },
                new SqlParameter("@Prefix_OpticalCode", SqlDbType.VarChar, 50)
                {
                    Value = list[0].Prefix_OpticalCode
                },
                new SqlParameter("@Prefix_MotherboardEncoding", SqlDbType.VarChar, 50)
                {
                    Value = list[0].Prefix_MotherboardEncoding
                },
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #2
0
        /// <summary>
        /// 前缀订单更新表
        /// </summary>
        /// <param name="projeSelect"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_SelectPrefixDal(ProjectorInformation_SelectPrefix projeSelect, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@TypeName", SqlDbType.VarChar, 50)
                {
                    Value = projeSelect.TypeName
                },
                new SqlParameter("@Prefix_BodyCode", SqlDbType.VarChar, 50)
                {
                    Value = projeSelect.Prefix_BodyCode
                },
                new SqlParameter("@Prefix_OpticalCode", SqlDbType.VarChar, 50)
                {
                    Value = projeSelect.Prefix_OpticalCode
                },
                new SqlParameter("@Prefix_MotherboardEncoding", SqlDbType.VarChar, 50)
                {
                    Value = projeSelect.Prefix_MotherboardEncoding
                },
                new SqlParameter("@ZhiDan", SqlDbType.VarChar, 50)
                {
                    Value = projeSelect.ZhiDan
                },
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #3
0
        /// <summary>
        /// 维修更新
        /// </summary>
        /// <param name="piWX"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_MainTable_WXDal(ProjectorInformation_WX piWX, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = piWX.FuselageCode
                },
                new SqlParameter("@RepairText", SqlDbType.VarChar, 500)
                {
                    Value = "++" + piWX.RepairText
                },
                new SqlParameter("@RepairTime", SqlDbType.DateTime)
                {
                    Value = piWX.RepairTime
                },
                new SqlParameter("@AfterMaintenanceOpticalCode", SqlDbType.VarChar, 80)
                {
                    Value = piWX.AfterMaintenanceOpticalCode
                },
                new SqlParameter("@AfterMaintenanceMainBoardCode", SqlDbType.VarChar, 50)
                {
                    Value = piWX.AfterMaintenanceMainBoardCode
                },
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #4
0
        /// <summary>
        /// 打光机更新
        /// </summary>
        /// <param name="pdg"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_MainTableDal(ProjectorInformation_DG pdg, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@OpticalCode", SqlDbType.VarChar, 80)
                {
                    Value = pdg.OpticalCode
                },
                new SqlParameter("@PolishingMachineTime", SqlDbType.DateTime)
                {
                    Value = pdg.PolishingMachineTime
                },
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = pdg.FuselageCode
                },
                new SqlParameter("@MainBoardCode", SqlDbType.VarChar, 50)
                {
                    Value = pdg.MainBoardCode
                },
                new SqlParameter("@MainBoardTime", SqlDbType.DateTime)
                {
                    Value = pdg.MainBoardTime
                },
                new SqlParameter("@ZhiDan", SqlDbType.VarChar, 50)
                {
                    Value = pdg.ZhiDan
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #5
0
        /// <summary>
        /// 亮度测试更新
        /// </summary>
        /// <param name="piLD"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_MainTable_LDZ2Dal(ProjectorInformation_LD piLD, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = piLD.FuselageCode
                },
                new SqlParameter("@IlluminationValue", SqlDbType.VarChar, 50)
                {
                    Value = piLD.IlluminationValue
                },
                new SqlParameter("@WiredMAC", SqlDbType.VarChar, 50)
                {
                    Value = piLD.WiredMAC
                },
                new SqlParameter("@wirelessMAC", SqlDbType.VarChar, 50)
                {
                    Value = piLD.wirelessMAC
                },
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #6
0
        /// <summary>
        /// 按机身码删除数据
        /// </summary>
        /// <param name="FuselageCode"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int deleteProjectorInformation_MainTableFuselageCodeDal(string FuselageCode, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = FuselageCode
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #7
0
        /// <summary>
        /// 包装更新
        /// </summary>
        /// <param name="piBZ"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_MainTable_BZDal(ProjectorInformation_BZ piBZ, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = piBZ.FuselageCode
                },
                new SqlParameter("@PackingTime", SqlDbType.VarChar, 500)
                {
                    Value = piBZ.PackingTime
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #8
0
        /// <summary>
        /// 老化后插入数据
        /// </summary>
        /// <param name="proje"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int insertProjectorInformation_MainTable_LHHDal(ProjectorInformation_LHH proje, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = proje.FuselageCode
                },
                new SqlParameter("@PostAgingTestTime", SqlDbType.DateTime)
                {
                    Value = proje.PostAgingTestTime
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #9
0
        /// <summary>
        /// 老化下架时间更新
        /// </summary>
        /// <param name="lhx"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_MainTable_LHXDal(ProjectorInformation_LHX lhx, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = lhx.FuselageCode
                },
                new SqlParameter("@AgeingEndTime", SqlDbType.DateTime)
                {
                    Value = lhx.AgeingEndTime
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #10
0
        /// <summary>
        /// 老化前测试更新
        /// </summary>
        /// <param name="FuselageCode"></param>
        /// <param name="PreAgingTestTime"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_MainTable_LHQDal(string FuselageCode, DateTime PreAgingTestTime, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = FuselageCode
                },
                new SqlParameter("@PreAgingTestTime", SqlDbType.DateTime)
                {
                    Value = PreAgingTestTime
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #11
0
        /// <summary>
        /// 主板表更新数据
        /// </summary>
        /// <param name="proje"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int updateProjectorInformation_MainBoardDal(ProjectorInformation_MainBoard proje, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@MainBoardCode", SqlDbType.VarChar, 50)
                {
                    Value = proje.MainBoardCode
                },
                new SqlParameter("@MainBoardTime", SqlDbType.DateTime)
                {
                    Value = proje.MainBoardTime
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #12
0
        public int updateProjectorInformation_MACDal(ProjectorInformation_MAC pmac, string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);

            SqlParameter[] pms = new SqlParameter[]
            {
                new SqlParameter("@MAC", SqlDbType.VarChar, 80)
                {
                    Value = pmac.MAC
                },
                new SqlParameter("@selectedTab", SqlDbType.VarChar, 50)
                {
                    Value = pmac.selectedTab
                },
                new SqlParameter("@LHSX", SqlDbType.Bit)
                {
                    Value = pmac.LHSX
                }
            };

            return(SQLhelp.ExecuteNonQuery(sql, CommandType.Text, pms));
        }
コード例 #13
0
        /// <summary>
        /// 多条件删除
        /// </summary>
        /// <param name="FuselageCode"></param>
        /// <param name="ZhiDan"></param>
        /// <param name="OpticalCode"></param>
        /// <param name="MainBoardCode"></param>
        /// <param name="WiredMAC"></param>
        /// <param name="wirelessMAC"></param>
        /// <param name="SQLCommand"></param>
        /// <returns></returns>
        public int deleteProjectorInformation_MainTableDal(string FuselageCode, string ZhiDan, string OpticalCode, string MainBoardCode, string WiredMAC, string wirelessMAC, string SQLCommand)
        {
            StringBuilder sql = new StringBuilder(SQLhelp.GetSQLCommand(SQLCommand));

            List <SqlParameter> listsqlpar = new List <SqlParameter>();
            List <string>       wherelist  = new List <string>();

            if (FuselageCode.Length > 0)
            {
                wherelist.Add(" FuselageCode=@FuselageCode ");
                listsqlpar.Add(new SqlParameter("@FuselageCode", SqlDbType.VarChar, 80)
                {
                    Value = FuselageCode
                });
            }
            if (ZhiDan.Length > 0)
            {
                wherelist.Add(" ZhiDan=@ZhiDan ");
                listsqlpar.Add(new SqlParameter("@ZhiDan", SqlDbType.VarChar, 50)
                {
                    Value = ZhiDan
                });
            }
            if (OpticalCode.Length > 0)
            {
                wherelist.Add(" OpticalCode=@OpticalCode ");
                listsqlpar.Add(new SqlParameter("@OpticalCode", SqlDbType.VarChar, 80)
                {
                    Value = OpticalCode
                });
            }
            if (MainBoardCode.Length > 0)
            {
                wherelist.Add(" MainBoardCode=@MainBoardCode ");
                listsqlpar.Add(new SqlParameter("@MainBoardCode", SqlDbType.VarChar, 50)
                {
                    Value = MainBoardCode
                });
            }
            if (WiredMAC.Length > 0)
            {
                wherelist.Add(" WiredMAC=@WiredMAC ");
                listsqlpar.Add(new SqlParameter("@WiredMAC", SqlDbType.VarChar, 50)
                {
                    Value = WiredMAC
                });
            }
            if (wirelessMAC.Length > 0)
            {
                wherelist.Add(" wirelessMAC=@wirelessMAC ");
                listsqlpar.Add(new SqlParameter("@wirelessMAC", SqlDbType.VarChar, 50)
                {
                    Value = wirelessMAC
                });
            }

            if (wherelist.Count > 0)
            {
                sql.Append(" where ");
                sql.Append(string.Join(" and ", wherelist));
            }

            if (listsqlpar.Count > 0)
            {
                return(SQLhelp.ExecuteNonQuery(sql.ToString(), CommandType.Text, listsqlpar.ToArray()));
            }
            else
            {
                return(SQLhelp.ExecuteNonQuery(sql.ToString(), CommandType.Text));
            }
        }