Ejemplo n.º 1
0
        public ProjectorInformation_SelectPrefix selecctProjectorInformation_SelectPrefixDal(string SQLCommand)
        {
            string sql = SQLhelp.GetSQLCommand(SQLCommand);
            ProjectorInformation_SelectPrefix projeSelect = new ProjectorInformation_SelectPrefix();

            try
            {
                using (SqlDataReader reader = SQLhelp.ExecuteReader(sql, CommandType.Text))
                {
                    if (reader.HasRows)
                    {
                        while (reader.Read())
                        {
                            projeSelect.TypeName                   = reader.GetString(0);
                            projeSelect.Prefix_BodyCode            = reader.IsDBNull(1) ? "" : reader.GetString(1);
                            projeSelect.Prefix_OpticalCode         = reader.IsDBNull(2) ? "" : reader.GetString(2);
                            projeSelect.Prefix_MotherboardEncoding = reader.IsDBNull(3) ? "" : reader.GetString(3);
                            projeSelect.ZhiDan = reader.IsDBNull(4) ? "" : reader.GetString(4);
                        }
                    }
                    return(projeSelect);
                }
            }
            catch
            {
                throw;
            }
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 前缀订单号更新表
 /// </summary>
 /// <param name="projeSelect"></param>
 /// <param name="SQLCommand"></param>
 /// <returns></returns>
 public bool updateProjectorInformation_SelectPrefixBll(ProjectorInformation_SelectPrefix projeSelect, string SQLCommand)
 {
     if (projeSelectDal.updateProjectorInformation_SelectPrefixDal(projeSelect, SQLCommand) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 4
0
        ProjectorInformation_SelectPrefix GetProjectorInformation_SelectPrefix(ProjectorInformation_EncodingRules projeEncoding)
        {
            ProjectorInformation_SelectPrefix projeSelect = new ProjectorInformation_SelectPrefix();

            projeSelect.TypeName                   = projeEncoding.TypeName;
            projeSelect.Prefix_BodyCode            = projeEncoding.Prefix_BodyCode;
            projeSelect.Prefix_OpticalCode         = projeEncoding.Prefix_OpticalCode;
            projeSelect.Prefix_MotherboardEncoding = projeEncoding.Prefix_MotherboardEncoding;
            projeSelect.ZhiDan = this.ZhiDan;

            return(projeSelect);
        }