public int InsertProSupInfo(string paramProductID, string paramSupplierID, string paramPrice, string paramRemark)
        {
            string Sql = string.Empty;

            Sql = "insert into product_supplier_info (product_id ,supplier_id,pro_price,remark)values('" + paramProductID + "','" + paramSupplierID + "','" + paramPrice + "','" + paramRemark + "')";
            int i = mySqlconn.ExecuteNonQuery(Sql);

            return(i);
        }
        /// <summary>
        /// 添加模块信息
        /// </summary>
        /// <param name="paramModeName"></param>
        /// <param name="paramFormName"></param>
        /// <param name="paramParentID"></param>
        /// <returns></returns>
        public int AddModuleInfo(string paramModeName, string paramFormName, string paramParentID, string Sort)
        {
            string SqlQuery = @"INSERT INTO T_Module ([ModuleName]  ,[FormName] ,[ParentID],sort)
                              VALUES('" + paramModeName + "','" + paramFormName + "','" + paramParentID + "','"+ Sort + "')";
            int rows = 0;
            rows = mySqlconn.ExecuteNonQuery(SqlQuery);
            return rows;

        }
Beispiel #3
0
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string RoleIDlist)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("delete from T_RoleInfo ");
            strSql.Append(" where RoleID in (" + RoleIDlist + ")  ");
            int rows = mySqlconn.ExecuteNonQuery(strSql.ToString());

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 新增库存信息
        /// </summary>
        /// <param name="paramStoreHouse_ID"></param>
        /// <param name="paramRemark"></param>
        /// <param name="paramAddress"></param>
        /// <returns></returns>
        public int InsertHouse(string paramStoreHouse_ID, string paramRemark, string paramAddress)
        {
            string Sql = string.Empty;
            string str = string.Empty;

            str = "select * from  store_house where store_house_id='" + paramStoreHouse_ID + "'";
            DataSet myDs = new DataSet();

            myDs = mySqlconn.Query(str);
            if (myDs.Tables[0].Rows.Count > 0)
            {
                return(-1);      //返回-1,store_house表中已存在该store_house_id
            }
            else
            {
                Sql = "insert into store_house (store_house_id,Remark,Address,create_date)values('" + paramStoreHouse_ID + "','" + paramRemark + "','" + paramAddress + "', '" + DateTime.Now.ToString("yyyy-MM-dd") + "')";
                int i = mySqlconn.ExecuteNonQuery(Sql);
                return(i);
            }
        }
Beispiel #5
0
        /// <summary>
        /// 新增供应商信息
        /// </summary>
        /// <param name="SupplierID"></param>
        /// <param name="Name"></param>
        /// <param name="Address"></param>
        /// <param name="Phone"></param>
        /// <param name="Fax"></param>
        /// <param name="PostalCode"></param>
        /// <param name="ConstactPerson"></param>
        /// <returns></returns>
        public int InsertSupplier(string SupplierID, string Name, string Address, string Phone, string Fax,
                                  string PostalCode, string ConstactPerson)
        {
            string Sql = string.Empty;
            string str = string.Empty;

            str = "select * from  Supplier where supplier_id='" + SupplierID + "'";
            DataSet myDs = new DataSet();

            myDs = mySqlconn.Query(str);
            if (myDs.Tables[0].Rows.Count > 0)
            {
                return(-1);      //返回-1,Supplier表中已存在该SupplierID
            }
            else
            {
                Sql = "insert into Supplier (supplier_id, name, address, phone, fax, postal_code, constact_person, create_date)values('" + SupplierID + "','" + Name + "','" + Address + "','" + Phone + "','" + Fax + "','" + PostalCode + "','" + ConstactPerson + "', '" + DateTime.Now.ToString("yyyy-MM-dd") + "')";
                int i = mySqlconn.ExecuteNonQuery(Sql);
                return(i);
            }
        }
Beispiel #6
0
        public bool UpdateMyPassword(string Username, string NewPassword)
        {
            string strSQL = " update users set passwd = '" + NewPassword + "' where username = '******' ";

            return(mySqlconn.ExecuteNonQuery(strSQL) > 0?true:false);
        }
Beispiel #7
0
        public bool ProductDelete(string ProductId)
        {
            string sql = "delete from product_list where product_id='" + ProductId + "'";

            return(mysqlconn.ExecuteNonQuery(sql) > 0 ? true : false);
        }