コード例 #1
0
ファイル: FrmMembership.cs プロジェクト: ajaykucse/LaraApp
        private void LoadMemberType()
        {
            DataTable dtMemberType = _objSalesman.GetDataMemberType(0);

            if (dtMemberType.Rows.Count > 0)
            {
                CmbMemberType.Enabled = true;
                Dictionary <string, string> _CmbMemberType = new Dictionary <string, string>();
                foreach (DataRow ro in dtMemberType.Rows)
                {
                    _CmbMemberType.Add(ro["MemberTypeId"].ToString(), ro["MemberTypeDesc"].ToString());
                }
                CmbMemberType.DataSource    = new BindingSource(_CmbMemberType, null);
                CmbMemberType.DisplayMember = "Value";
                CmbMemberType.ValueMember   = "Key";
            }
        }
コード例 #2
0
 private void FrmMemberType_Load(object sender, EventArgs e)
 {
     NavMenuDataList = _objSalesman.GetDataMemberType(0);
     ControlEnableDisable(true, false);
     ClearFld();
     if (_IsNew == 'Y')
     {
         BtnEdit.Enabled         = false;
         BtnDelete.Enabled       = false;
         BtnFirstData.Enabled    = false;
         BtnNextData.Enabled     = false;
         BtnPreviousData.Enabled = false;
         BtnLastData.Enabled     = false;
     }
     BtnNew.Focus();
 }