예제 #1
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            MySqlCmd.MySqlContext input_udata = new MySqlCmd.MySqlContext();
            input_udata.conn       = MySqlCmd.Connection(WebConfigurationManager.ConnectionStrings["senshang_database_connection_string"].ToString());
            input_udata.status     = MySqlRequest.UPDATE;
            input_udata.create_cmd = create_cmd;

            MySqlCmd.SetMySqlCommand(ref input_udata);
            FilledCurrentDataGrid();
        }
예제 #2
0
        /// <summary>
        /// 此方法提供了一个统一的提交按钮的实现模板
        /// </summary>
        /// <param name="create_cmd">自定义命令</param>
        public static void UtilitySubmitButtonClick(MySqlRequest req_type, MySqlCmd.CreateCommand create_cmd)
        {
            MySqlCmd.MySqlContext input_udata = new MySqlCmd.MySqlContext();
            input_udata.conn       = MySqlCmd.Connection(WebConfigurationManager.ConnectionStrings["MySqlConnectionString"].ToString());
            input_udata.status     = req_type;
            input_udata.create_cmd = create_cmd;
            input_udata.res        = 0;

            MySqlCmd.SetMySqlCommand(ref input_udata);
        }
예제 #3
0
        public void ProcessRequest(HttpContext context)
        {
            user.uname = context.Request["uname"];
            user.pwd   = context.Request["password"];

            MySqlCmd.MySqlContext udata = new MySqlCmd.MySqlContext();
            try {
                udata.conn       = MySqlCmd.Connection(WebConfigurationManager.ConnectionStrings["MySqlConnectionString"].ToString());
                udata.status     = MySqlRequest.SEARCH;
                udata.create_cmd = CheckUser;
                udata.res        = 0;

                MySqlCmd.LoginCommand(ref udata);
            }
            catch (Exception ex) {
                var res = new { msg = "2", data = ex.Message };
                ResponseToClient(context, res);

                return;
            }

            ResultResponse(context, udata);
        }
예제 #4
0
        /// <summary>
        /// 填充表格
        /// </summary>
        /// <param name="select_string">数据库SELECT命令</param>
        /// /// <returns>view_dt应返回给一个用户自定义的全局DataTable</returns>
        public static void FilledCurrentForm(string connect_string, string select_string, ref MySqlCmd.MySqlAdapter adapter)
        {
            MySqlConnection conn = MySqlCmd.Connection(connect_string);

            MySqlCmd.SetMySqlDataAdapter(select_string, conn, ref adapter, Instance.Fill_Form);
        }