Esempio n. 1
0
        /// <summary>
        /// 同填表人,同流水只能有一张表
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool ExistsUserAndNum(MulaolaoLibrary.GongXuGongZiLibrary model)
        {
            StringBuilder strSql = new StringBuilder( );

            strSql.Append("SELECT COUNT(1) FROM R_PQR");
            strSql.Append(" WHERE  DS01=@DS01 AND DS11=@DS11 AND DS21!=@DS21");
            SqlParameter [] parameter =
            {
                new SqlParameter("@DS01", SqlDbType.NVarChar),
                new SqlParameter("@DS11", SqlDbType.NVarChar),
                new SqlParameter("@DS21", SqlDbType.NVarChar)
            };
            parameter [0].Value = model.DS01;
            parameter [1].Value = model.DS11;
            parameter [2].Value = model.DS21;

            return(SqlHelper.Exists(strSql.ToString( ), parameter));
        }
Esempio n. 2
0
        /// <summary>
        /// 更新一条记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateOther(MulaolaoLibrary.GongXuGongZiLibrary model, string tableNum, string tableName, string logins, DateTime dtOne, string stateOf, string stateOfOdd)
        {
            ArrayList     SQLString = new ArrayList( );
            StringBuilder strSql    = new StringBuilder( );

            strSql.Append("UPDATE R_PQR SET");
            strSql.AppendFormat(" DS10='{0}',", model.DS10);
            strSql.AppendFormat(" DS11='{0}',", model.DS11);
            strSql.AppendFormat(" DS12='{0}',", model.DS12);
            strSql.AppendFormat(" DS13='{0}',", model.DS13);
            strSql.AppendFormat(" DS14='{0}',", model.DS14);
            strSql.AppendFormat(" DS01='{0}',", model.DS01);
            strSql.AppendFormat(" DS22='{0}',", model.DS22);
            strSql.AppendFormat(" DS24='{0}',", model.DS24);
            strSql.AppendFormat(" DS25='{0}',", model.DS25);
            strSql.AppendFormat(" DS26='{0}',", model.DS26);
            strSql.AppendFormat(" DS27='{0}'", model.DS27);
            strSql.AppendFormat(" WHERE DS21='{0}'", model.DS21);
            SQLString.Add(strSql.ToString( ));
            SQLString.Add(Drity.DrityOfComparation(tableNum, tableName, logins, dtOne, model.DS21, strSql.ToString( ).Replace("'", "''"), stateOf, stateOfOdd));

            return(SqlHelper.ExecuteSqlTran(SQLString));
        }
Esempio n. 3
0
        /// <summary>
        /// 更新一条记录
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool UpdateWei(MulaolaoLibrary.GongXuGongZiLibrary model)
        {
            ArrayList     SQLString = new ArrayList( );
            StringBuilder strSql    = new StringBuilder( );

            strSql.Append("UPDATE R_PQR SET");
            strSql.AppendFormat(" DS10='{0}',", model.DS10);
            strSql.AppendFormat(" DS11='{0}',", model.DS11);
            strSql.AppendFormat(" DS12='{0}',", model.DS12);
            strSql.AppendFormat(" DS13='{0}',", model.DS13);
            strSql.AppendFormat(" DS14='{0}',", model.DS14);
            strSql.AppendFormat(" DS19='{0}',", model.DS19);
            strSql.AppendFormat(" DS20='{0}',", model.DS20);
            strSql.AppendFormat(" DS01='{0}',", model.DS01);
            strSql.AppendFormat(" DS22='{0}',", model.DS22);
            strSql.AppendFormat(" DS24='{0}',", model.DS24);
            strSql.AppendFormat(" DS25='{0}',", model.DS25);
            strSql.AppendFormat(" DS26='{0}',", model.DS26);
            strSql.AppendFormat(" DS27='{0}'", model.DS27);
            strSql.AppendFormat(" WHERE DS21='{0}'", model.DS21);
            SQLString.Add(strSql.ToString( ));

            return(SqlHelper.ExecuteSqlTran(SQLString));
        }
Esempio n. 4
0
        /// <summary>
        /// 获取一个实例对象
        /// </summary>
        /// <param name="row"></param>
        /// <returns></returns>
        public MulaolaoLibrary.GongXuGongZiLibrary GetDataRow(DataRow row)
        {
            MulaolaoLibrary.GongXuGongZiLibrary model = new MulaolaoLibrary.GongXuGongZiLibrary( );

            if (row != null)
            {
                if (row["idx"] != null && row["idx"].ToString( ) != "")
                {
                    model.Idx = int.Parse(row["idx"].ToString( ));
                }
                if (row["DS01"] != null && row["DS01"].ToString( ) != "")
                {
                    model.DS01 = row["DS01"].ToString( );
                }
                if (row["DS02"] != null && row["DS02"].ToString( ) != "")
                {
                    model.DS02 = row["DS02"].ToString( );
                }
                if (row["DS03"] != null && row["DS03"].ToString( ) != "")
                {
                    model.DS03 = row["DS03"].ToString( );
                }
                if (row["DS04"] != null && row["DS04"].ToString( ) != "")
                {
                    model.DS04 = row["DS04"].ToString( );
                }
                if (row["DS05"] != null && row["DS05"].ToString( ) != "")
                {
                    model.DS05 = long.Parse(row["DS05"].ToString( ));
                }
                if (row["DS06"] != null && row["DS06"].ToString( ) != "")
                {
                    model.DS06 = long.Parse(row["DS06"].ToString( ));
                }
                //if ( row["DS07"] != null && row["DS07"].ToString( ) != "" )
                //    model.DS07 = decimal.Parse( row["DS07"].ToString( ) );
                if (row["DS08"] != null && row["DS08"].ToString( ) != "")
                {
                    model.DS08 = long.Parse(row["DS08"].ToString( ));
                }
                if (row["DS09"] != null && row["DS09"].ToString( ) != "")
                {
                    model.DS09 = row["DS09"].ToString( );
                }
                if (row["DS10"] != null && row["DS10"].ToString( ) != "")
                {
                    model.DS10 = row["DS10"].ToString( );
                }
                if (row["DS11"] != null && row["DS11"].ToString( ) != "")
                {
                    model.DS11 = row["DS11"].ToString( );
                }
                if (row["DS12"] != null && row["DS12"].ToString( ) != "")
                {
                    model.DS12 = DateTime.Parse(row["DS12"].ToString( ));
                }
                if (row["DS13"] != null && row["DS13"].ToString( ) != "")
                {
                    model.DS13 = row["DS13"].ToString( );
                }
                if (row["DS14"] != null && row["DS14"].ToString( ) != "")
                {
                    model.DS14 = DateTime.Parse(row["DS14"].ToString( ));
                }
                //if ( row["DS15"] != null && row["DS15"].ToString( ) != "" )
                //    model.DS15 = decimal.Parse( row["DS15"].ToString( ) );
                if (row["DS16"] != null && row["DS16"].ToString( ) != "")
                {
                    model.DS16 = long.Parse(row["DS16"].ToString( ));
                }
                if (row["DS17"] != null && row["DS17"].ToString( ) != "")
                {
                    model.DS17 = row["DS17"].ToString( );
                }
                if (row["DS18"] != null && row["DS18"].ToString( ) != "")
                {
                    model.DS18 = decimal.Parse(row["DS18"].ToString( ));
                }
                if (row["DS19"] != null && row["DS19"].ToString( ) != "")
                {
                    model.DS19 = row["DS19"].ToString( );
                }
                if (row["DS20"] != null && row["DS20"].ToString( ) != "")
                {
                    model.DS20 = row["DS20"].ToString( );
                }
                if (row["DS21"] != null && row["DS21"].ToString( ) != "")
                {
                    model.DS21 = row["DS21"].ToString( );
                }
                if (row["DS22"] != null && row["DS22"].ToString( ) != "")
                {
                    model.DS22 = row["DS22"].ToString( );
                }
                if (row["DS24"] != null && row["DS24"].ToString( ) != "")
                {
                    model.DS24 = row["DS24"].ToString( );
                }
                if (row["DS25"] != null && row["DS25"].ToString( ) != "")
                {
                    model.DS25 = long.Parse(row["DS25"].ToString( ));
                }
                if (row["DS26"] != null && row["DS26"].ToString( ) != "")
                {
                    model.DS26 = row["DS26"].ToString( );
                }
                if (row["DS27"] != null && row["DS27"].ToString( ) != "")
                {
                    model.DS27 = DateTime.Parse(row["DS27"].ToString( ));
                }
                if (row["DS28"] != null && row["DS28"].ToString( ) != "")
                {
                    model.DS28 = int.Parse(row["DS28"].ToString( ));
                }
                if (row["DS29"] != null && row["DS29"].ToString( ) != "")
                {
                    model.DS29 = int.Parse(row["DS29"].ToString( ));
                }
            }

            return(model);
        }
Esempio n. 5
0
 /// <summary>
 /// 更新一条记录
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateOther(MulaolaoLibrary.GongXuGongZiLibrary model, string tableNum, string tableName, string logins, DateTime dtOne, string stateOf, string stateOfOdd)
 {
     return(dao.UpdateOther(model, tableNum, tableName, logins, dtOne, stateOf, stateOfOdd));
 }
Esempio n. 6
0
 /// <summary>
 /// 更新一条记录
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool UpdateWei(MulaolaoLibrary.GongXuGongZiLibrary model)
 {
     return(dao.UpdateWei(model));
 }
Esempio n. 7
0
 /// <summary>
 /// 同填表人,同流水只能有一张表
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool ExistsUserAndNum(MulaolaoLibrary.GongXuGongZiLibrary model)
 {
     return(dao.ExistsUserAndNum(model));
 }
Esempio n. 8
0
 /// <summary>
 /// 插入一条记录
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool InsertGen(MulaolaoLibrary.GongXuGongZiLibrary model)
 {
     return(dao.InsertGen(model));
 }