Beispiel #1
0
        public string FormatToTable()
        {
            string formattedDate = FormatDate();

            return($"{Name} {formattedDate} {PhoneNumber} {MemberTypeID.ToString()} {Password} {Username}");
        }
Beispiel #2
0
        protected void lvMDMemberType_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            Int64 MemberTypeID;

            Int64.TryParse(e.CommandArgument.ToString(), out MemberTypeID);

            if (MemberTypeID > 0)
            {
                if (string.Equals(e.CommandName, "EditItem"))
                {
                    _MemberTypeID = MemberTypeID;

                    PrepareEditView();

                    cpeEditor.Collapsed   = false;
                    cpeEditor.ClientState = "false";
                }
                else if (string.Equals(e.CommandName, "DeleteItem"))
                {
                    try
                    {
                        Int64 result = -1;

                        String fe = SqlExpressionBuilder.PrepareFilterExpression(MDMemberTypeEntity.FLD_NAME_MemberTypeID, MemberTypeID.ToString(), SQLMatchType.Equal);

                        MDMemberTypeEntity mDMemberTypeEntity = new MDMemberTypeEntity();


                        result = FCCMDMemberType.GetFacadeCreate().Delete(mDMemberTypeEntity, fe, DatabaseOperationType.Delete, TransactionRequired.No);

                        if (result == 0)
                        {
                            _MemberTypeID       = 0;
                            _MDMemberTypeEntity = new MDMemberTypeEntity();
                            PrepareInitialView();
                            BindMDMemberTypeList();

                            MiscUtil.ShowMessage(lblMessage, "Member Type has been successfully deleted.", true);
                        }
                        else
                        {
                            MiscUtil.ShowMessage(lblMessage, "Failed to delete Member Type.", true);
                        }
                    }
                    catch (Exception ex)
                    {
                        MiscUtil.ShowMessage(lblMessage, ex.Message, true);
                    }
                }
            }
        }