//对话框载入
 private void MemberCardUsingForm_Load(object sender, EventArgs e)
 {
     dao = new DAO(LogIn.connectionString);
     memberSetting = dao.get_MemberSetting();
     id.Enabled = (memberSetting.cardType == "CT");
     if (!MConvert<bool>.ToTypeOrDefault(LogIn.options.启用会员卡密码, false) || LogIn.options.会员卡密码类型 != "指纹")
     {
         m_use_finger_pwd = false;
     }
     btnAdd_Click(null, null);
     money.Text = m_money.ToString();
 }
Beispiel #2
0
 //对话框载入
 private void MemberForm_Load(object sender, EventArgs e)
 {
     dao = new DAO(LogIn.connectionString);
     memberSetting = dao.get_MemberSetting();
 }
Beispiel #3
0
        public CMemberSetting get_MemberSetting()
        {
            CMemberSetting memberSetting = null;
            SqlConnection sqlCn = null;

            try
            {
                sqlCn = new SqlConnection(_con_str);
                sqlCn.Open();

                string cmd_str = "Select * from [MemberSetting]";
                SqlCommand cmdSelect = new SqlCommand(cmd_str, sqlCn);
                using (SqlDataReader dr = cmdSelect.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        memberSetting = new CMemberSetting();

                        memberSetting.id = (int)dr["id"];
                        memberSetting.money = ToInt(dr["money"]);
                        memberSetting.cardType = dr["cardType"].ToString();

                        break;
                    }
                }

            }
            catch (System.Exception e)
            {
                BathClass.printErrorMsg(e.Message);
            }
            finally
            {
                close_connection(sqlCn);
            }

            return memberSetting;
        }
        //对话框载入
        private void MemberCardUsingForm_Load(object sender, EventArgs e)
        {
            try
            {
                memberSetting = dao.get_MemberSetting();
                cardType = memberSetting.cardType;
                if (cardType != "CT")
                    get_member();
                else
                    id.Enabled = true;

                if (!MConvert<bool>.ToTypeOrDefault(LogIn.options.启用会员卡密码, false) || LogIn.options.会员卡密码类型 != "指纹")
                {
                    m_use_finger_pwd = false;
                }
            }
            catch (System.Exception ex)
            {
                BathClass.printErrorMsg(ex.Message);
            }
        }