コード例 #1
0
        private async Task <bool> Register()
        {
            if (IsInternet())
            {
                //check if all fields are completed
                if (String.IsNullOrWhiteSpace(Username) || String.IsNullOrWhiteSpace(Password) || String.IsNullOrWhiteSpace(ConfirmPass))
                {
                    await DisplayError(ErrorMsg.CompleteAllFieldsError);
                }
                else
                {
                    //verify status of fields
                    Models.TaskStatus emailStatus = FieldsHelper.VerifyEmail(Username);
                    if (!emailStatus.IsError)
                    {
                        Models.TaskStatus passwordStatus = FieldsHelper.VerifyPassword(Password);
                        if (!passwordStatus.IsError)
                        {
                            if (ConfirmPass == Password)
                            {
                                if (!Password.ToLower().Contains(Username.ToLower()))
                                {
                                    await PageService.PushPopupAsync(new WaitForActionView());

                                    string            authPassword   = VaultManager.CreateAuthPassword(Username, Password);
                                    Models.TaskStatus statusRegister = await UserProcessor.Register(ApiHelper.ApiClient, Username, authPassword, authPassword);

                                    if (!statusRegister.IsError)
                                    {
                                        return(true);
                                    }
                                    else
                                    {
                                        await PageService.PopPopupAsync();
                                        await DisplayError(statusRegister.Message);
                                    }
                                }
                                else
                                {
                                    await DisplayError("Your email can't be in your password!");
                                }
                            }
                            else
                            {
                                await DisplayError("Your Confirm Password and your Password are not the same!");
                            }
                        }
                        else
                        {
                            await DisplayError(passwordStatus.Message);
                        }
                    }
                    else
                    {
                        await DisplayError(emailStatus.Message);
                    }
                }
            }
            return(false);
        }
コード例 #2
0
 private void fillModel(DbDataReader dr, TravelGroupInfo model)
 {
     model.ID              = dr.GetInt32(0);
     model.LineID          = dr.GetInt32(1);
     model.Name            = dr.GetString(2);
     model.TotalNum        = dr.GetInt32(3);
     model.RemainNum       = dr.GetInt32(4);
     model.JoinNum         = dr.GetInt32(5);
     model.PromotionNum    = dr.GetInt32(6);
     model.GroupNum        = dr.GetString(7);
     model.GoDate          = dr.GetDateTime(8);
     model.BackDate        = dr.GetDateTime(9);
     model.GatheringTime   = dr.GetString(10);
     model.GatheringPlace  = dr.GetString(11);
     model.TransferPlace   = dr.GetString(12);
     model.GoTravel        = dr.GetString(13);
     model.BackTravel      = dr.GetString(14);
     model.OuterPrice      = dr.GetDecimal(15);
     model.InnerPrice      = dr.GetDecimal(16);
     model.Deposit         = dr.GetDecimal(17);
     model.GruopLeader     = dr.GetString(18);
     model.TravelGuide     = dr.GetString(19);
     model.IsDel           = dr.GetInt32(20);
     model.IsPublish       = dr.GetInt32(21);
     model.Remarks         = dr.GetString(22);
     model.AddUserName     = dr.GetString(23);
     model.AddUserRealName = dr.GetString(24);
     model.AddTime         = dr.GetDateTime(25);
     model.ExtraFields     = FieldsHelper.XmlDeserialize(dr.GetString(26));
 }
コード例 #3
0
 private DbParameter[] makeParameterForUpdate(TravelGroupInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@LineID",          model.LineID),
         Db.Helper.MakeInParameter("@Name",            model.Name),
         Db.Helper.MakeInParameter("@TotalNum",        model.TotalNum),
         Db.Helper.MakeInParameter("@RemainNum",       model.RemainNum),
         Db.Helper.MakeInParameter("@JoinNum",         model.JoinNum),
         Db.Helper.MakeInParameter("@PromotionNum",    model.PromotionNum),
         Db.Helper.MakeInParameter("@GroupNum",        model.GroupNum),
         Db.Helper.MakeInParameter("@GoDate",          model.GoDate),
         Db.Helper.MakeInParameter("@BackDate",        model.BackDate),
         Db.Helper.MakeInParameter("@GatheringTime",   model.GatheringTime),
         Db.Helper.MakeInParameter("@GatheringPlace",  model.GatheringPlace),
         Db.Helper.MakeInParameter("@TransferPlace",   model.TransferPlace),
         Db.Helper.MakeInParameter("@GoTravel",        model.GoTravel),
         Db.Helper.MakeInParameter("@BackTravel",      model.BackTravel),
         Db.Helper.MakeInParameter("@OuterPrice",      model.OuterPrice),
         Db.Helper.MakeInParameter("@InnerPrice",      model.InnerPrice),
         Db.Helper.MakeInParameter("@Deposit",         model.Deposit),
         Db.Helper.MakeInParameter("@GruopLeader",     model.GruopLeader),
         Db.Helper.MakeInParameter("@TravelGuide",     model.TravelGuide),
         Db.Helper.MakeInParameter("@IsDel",           model.IsDel),
         Db.Helper.MakeInParameter("@IsPublish",       model.IsPublish),
         Db.Helper.MakeInParameter("@Remarks",         model.Remarks),
         Db.Helper.MakeInParameter("@AddUserName",     model.AddUserName),
         Db.Helper.MakeInParameter("@AddUserRealName", model.AddUserRealName),
         Db.Helper.MakeInParameter("@AddTime",         model.AddTime),
         Db.Helper.MakeInParameter("@ExtraFields",     FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@ID",              model.ID)
     };
     return(paras);
 }
コード例 #4
0
ファイル: TravelOrder.cs プロジェクト: syunie/.NETandCloud
 private DbParameter[] makeParameterForUpdate(TravelOrderInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@OrderType",         model.OrderType),
         Db.Helper.MakeInParameter("@OrderStatus",       model.OrderStatus),
         Db.Helper.MakeInParameter("@GroupID",           model.GroupID),
         Db.Helper.MakeInParameter("@LineID",            model.LineID),
         Db.Helper.MakeInParameter("@TotalMoney",        model.TotalMoney),
         Db.Helper.MakeInParameter("@MoneyPayed",        model.MoneyPayed),
         Db.Helper.MakeInParameter("@MoneyReturn",       model.MoneyReturn),
         Db.Helper.MakeInParameter("@BuyNum",            model.BuyNum),
         Db.Helper.MakeInParameter("@CanChangeNum",      model.CanChangeNum),
         Db.Helper.MakeInParameter("@PromotionID",       model.PromotionID),
         Db.Helper.MakeInParameter("@CompanyRemarks",    model.CompanyRemarks),
         Db.Helper.MakeInParameter("@AddTime",           model.AddTime),
         Db.Helper.MakeInParameter("@AddMemberName",     model.AddMemberName),
         Db.Helper.MakeInParameter("@AddMemberMobile",   model.AddMemberMobile),
         Db.Helper.MakeInParameter("@AddMemberRealName", model.AddMemberRealName),
         Db.Helper.MakeInParameter("@AddMemberRemarks",  model.AddMemberRemarks),
         Db.Helper.MakeInParameter("@InviteNum",         model.InviteNum),
         Db.Helper.MakeInParameter("@InviterUserName",   model.InviterUserName),
         Db.Helper.MakeInParameter("@InviterRealName",   model.InviterRealName),
         Db.Helper.MakeInParameter("@OperatorUserName",  model.OperatorUserName),
         Db.Helper.MakeInParameter("@OperatorRealName",  model.OperatorRealName),
         Db.Helper.MakeInParameter("@ExtraFields",       FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@OrderHistory",      model.OrderHistory),
         Db.Helper.MakeInParameter("@OrderNum",          model.OrderNum)
     };
     return(paras);
 }
コード例 #5
0
ファイル: Line.cs プロジェクト: syunie/.NETandCloud
 private DbParameter[] makeParameterForUpdate(LineInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@Name",            model.Name),
         Db.Helper.MakeInParameter("@FirstCatID",      model.FirstCatID),
         Db.Helper.MakeInParameter("@SecondCatID",     model.SecondCatID),
         Db.Helper.MakeInParameter("@ProductNum",      model.ProductNum),
         Db.Helper.MakeInParameter("@CoverPath",       model.CoverPath),
         Db.Helper.MakeInParameter("@BigPicPath",      model.BigPicPath),
         Db.Helper.MakeInParameter("@TravelDays",      model.TravelDays),
         Db.Helper.MakeInParameter("@StartAddress",    model.StartAddress),
         Db.Helper.MakeInParameter("@TargetAddress",   model.TargetAddress),
         Db.Helper.MakeInParameter("@GoTravel",        model.GoTravel),
         Db.Helper.MakeInParameter("@BackTravel",      model.BackTravel),
         Db.Helper.MakeInParameter("@SignUpNotice",    model.SignUpNotice),
         Db.Helper.MakeInParameter("@LineDesc",        model.LineDesc),
         Db.Helper.MakeInParameter("@OtherNotice",     model.OtherNotice),
         Db.Helper.MakeInParameter("@WarmTips",        model.WarmTips),
         Db.Helper.MakeInParameter("@MinPrice",        model.MinPrice),
         Db.Helper.MakeInParameter("@Tag",             model.Tag),
         Db.Helper.MakeInParameter("@Remarks",         model.Remarks),
         Db.Helper.MakeInParameter("@AddUserName",     model.AddUserName),
         Db.Helper.MakeInParameter("@AddUserRealName", model.AddUserRealName),
         Db.Helper.MakeInParameter("@AddTime",         model.AddTime),
         Db.Helper.MakeInParameter("@IsDel",           model.IsDel),
         Db.Helper.MakeInParameter("@ExtraFields",     FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@IsTop",           model.IsTop),
         Db.Helper.MakeInParameter("@IsHot",           model.IsHot),
         Db.Helper.MakeInParameter("@HitTimes",        model.HitTimes),
         Db.Helper.MakeInParameter("@IsPickup",        model.IsPickup),
         Db.Helper.MakeInParameter("@ID",              model.ID)
     };
     return(paras);
 }
コード例 #6
0
ファイル: Line.cs プロジェクト: syunie/.NETandCloud
 private void fillModel(DbDataReader dr, LineInfo model)
 {
     model.ID            = dr.GetInt32(0);
     model.Name          = dr.GetString(1);
     model.FirstCatID    = dr.GetInt32(2);
     model.SecondCatID   = dr.GetInt32(3);
     model.ProductNum    = dr.GetString(4);
     model.CoverPath     = dr.GetString(5);
     model.BigPicPath    = dr.GetString(6);
     model.TravelDays    = dr.GetString(7);
     model.StartAddress  = dr.GetString(8);
     model.TargetAddress = dr.GetString(9);
     model.GoTravel      = dr.GetString(10);
     model.BackTravel    = dr.GetString(11);
     model.SignUpNotice  = dr.GetString(12);
     model.LineDesc      = dr.GetString(13);
     model.OtherNotice   = dr.GetString(14);
     model.WarmTips      = dr.GetString(15);
     model.MinPrice      = dr.GetDecimal(16);
     model.Tag           = dr.GetString(17);
     if (!dr.IsDBNull(18))
     {
         model.Remarks = dr.GetString(18);
     }
     model.AddUserName     = dr.GetString(19);
     model.AddUserRealName = dr.GetString(20);
     model.AddTime         = dr.GetDateTime(21);
     model.IsDel           = dr.GetInt32(22);
     model.ExtraFields     = FieldsHelper.XmlDeserialize(dr.GetString(23));
     model.IsTop           = dr.GetInt32(24);
     model.IsHot           = dr.GetInt32(25);
     model.HitTimes        = dr.GetInt32(26);
     model.IsPickup        = dr.GetInt32(27);
 }
コード例 #7
0
ファイル: SiteMember.cs プロジェクト: syunie/.NETandCloud
 private DbParameter[] makeParameterForUpdate(SiteMemberInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@UserPwd",         model.UserPwd),
         Db.Helper.MakeInParameter("@RealName",        model.RealName),
         Db.Helper.MakeInParameter("@HeadPicPath",     model.HeadPicPath),
         Db.Helper.MakeInParameter("@Sex",             model.Sex),
         Db.Helper.MakeInParameter("@MobileNum",       model.MobileNum),
         Db.Helper.MakeInParameter("@IDNum",           model.IDNum),
         Db.Helper.MakeInParameter("@Email",           model.Email),
         Db.Helper.MakeInParameter("@QQ",              model.QQ),
         Db.Helper.MakeInParameter("@WeChat",          model.WeChat),
         Db.Helper.MakeInParameter("@TotalCost",       model.TotalCost),
         Db.Helper.MakeInParameter("@TotalPoints",     model.TotalPoints),
         Db.Helper.MakeInParameter("@UsedPoints",      model.UsedPoints),
         Db.Helper.MakeInParameter("@AddTime",         model.AddTime),
         Db.Helper.MakeInParameter("@Remarks",         model.Remarks),
         Db.Helper.MakeInParameter("@InviteNum",       model.InviteNum),
         Db.Helper.MakeInParameter("@InviterUserName", model.InviterUserName),
         Db.Helper.MakeInParameter("@InviterRealName", model.InviterRealName),
         Db.Helper.MakeInParameter("@ExtraFields",     FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@UserName",        model.UserName)
     };
     return(paras);
 }
コード例 #8
0
ファイル: TravelOrder.cs プロジェクト: syunie/.NETandCloud
 private void fillModel(DbDataReader dr, TravelOrderInfo model)
 {
     model.OrderNum          = dr.GetString(0);
     model.OrderType         = dr.GetString(1);
     model.OrderStatus       = dr.GetString(2);
     model.GroupID           = dr.GetInt32(3);
     model.LineID            = dr.GetInt32(4);
     model.TotalMoney        = dr.GetDecimal(5);
     model.MoneyPayed        = dr.GetDecimal(6);
     model.MoneyReturn       = dr.GetDecimal(7);
     model.BuyNum            = dr.GetInt32(8);
     model.CanChangeNum      = dr.GetInt32(9);
     model.PromotionID       = dr.GetInt32(10);
     model.CompanyRemarks    = dr.GetString(11);
     model.AddTime           = dr.GetDateTime(12);
     model.AddMemberName     = dr.GetString(13);
     model.AddMemberMobile   = dr.GetString(14);
     model.AddMemberRealName = dr.GetString(15);
     model.AddMemberRemarks  = dr.GetString(16);
     model.InviteNum         = dr.GetString(17);
     model.InviterUserName   = dr.GetString(18);
     model.InviterRealName   = dr.GetString(19);
     model.OperatorUserName  = dr.GetString(20);
     model.OperatorRealName  = dr.GetString(21);
     model.ExtraFields       = FieldsHelper.XmlDeserialize(dr.GetString(22));
     model.OrderHistory      = dr.GetString(23);
 }
コード例 #9
0
 private DbParameter[] makeParameterForUpdate(PromotionInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@Name",                   model.Name),
         Db.Helper.MakeInParameter("@CoverPath",              model.CoverPath),
         Db.Helper.MakeInParameter("@PromotionDesc",          model.PromotionDesc),
         Db.Helper.MakeInParameter("@PromotionType",          model.PromotionType),
         Db.Helper.MakeInParameter("@Discount",               model.Discount),
         Db.Helper.MakeInParameter("@TotalPayOneTime",        model.TotalPayOneTime),
         Db.Helper.MakeInParameter("@TotalPayOneTimeJoinNum", model.TotalPayOneTimeJoinNum),
         Db.Helper.MakeInParameter("@FullCutTotal",           model.FullCutTotal),
         Db.Helper.MakeInParameter("@FullCutMinus",           model.FullCutMinus),
         Db.Helper.MakeInParameter("@SecondKillPrice",        model.SecondKillPrice),
         Db.Helper.MakeInParameter("@StartTime",              model.StartTime),
         Db.Helper.MakeInParameter("@EndTime",                model.EndTime),
         Db.Helper.MakeInParameter("@IsDel",                  model.IsDel),
         Db.Helper.MakeInParameter("@Tag",                    model.Tag),
         Db.Helper.MakeInParameter("@Remarks",                model.Remarks),
         Db.Helper.MakeInParameter("@AddUserName",            model.AddUserName),
         Db.Helper.MakeInParameter("@AddUserRealName",        model.AddUserRealName),
         Db.Helper.MakeInParameter("@AddTime",                model.AddTime),
         Db.Helper.MakeInParameter("@ExtraFields",            FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@ID",                     model.ID)
     };
     return(paras);
 }
コード例 #10
0
ファイル: CostHistory.cs プロジェクト: syunie/.NETandCloud
 private void fillModel(DbDataReader dr, CostHistoryInfo model)
 {
     model.ID             = dr.GetInt32(0);
     model.UserName       = dr.GetString(1);
     model.PointsBefore   = dr.GetInt32(2);
     model.PointsAfter    = dr.GetInt32(3);
     model.PointsCost     = dr.GetInt32(4);
     model.GoodsID        = dr.GetInt32(5);
     model.GoodsNum       = dr.GetInt32(6);
     model.GoodsName      = dr.GetString(7);
     model.OrderNum       = dr.GetString(8);
     model.MoneyCost      = dr.GetDecimal(9);
     model.MoneyBefore    = dr.GetDecimal(10);
     model.MoneyAfter     = dr.GetDecimal(11);
     model.CostType       = dr.GetString(12);
     model.Remarks        = dr.GetString(13);
     model.AddTime        = dr.GetDateTime(14);
     model.ExtraFields    = FieldsHelper.XmlDeserialize(dr.GetString(15));
     model.ExchangeStatus = dr.GetString(16);
     model.ExpressName    = dr.GetString(17);
     model.ExpressNum     = dr.GetString(18);
     model.SendTime       = dr.GetDateTime(19);
     model.FinishTime     = dr.GetDateTime(20);
     model.LinkMan        = dr.GetString(21);
     model.LinkAddress    = dr.GetString(22);
     model.LinkPhone      = dr.GetString(23);
 }
コード例 #11
0
ファイル: CostHistory.cs プロジェクト: syunie/.NETandCloud
 private DbParameter[] makeParameterForUpdate(CostHistoryInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@UserName",       model.UserName),
         Db.Helper.MakeInParameter("@PointsBefore",   model.PointsBefore),
         Db.Helper.MakeInParameter("@PointsAfter",    model.PointsAfter),
         Db.Helper.MakeInParameter("@PointsCost",     model.PointsCost),
         Db.Helper.MakeInParameter("@GoodsID",        model.GoodsID),
         Db.Helper.MakeInParameter("@GoodsNum",       model.GoodsNum),
         Db.Helper.MakeInParameter("@GoodsName",      model.GoodsName),
         Db.Helper.MakeInParameter("@OrderNum",       model.OrderNum),
         Db.Helper.MakeInParameter("@MoneyCost",      model.MoneyCost),
         Db.Helper.MakeInParameter("@MoneyBefore",    model.MoneyBefore),
         Db.Helper.MakeInParameter("@MoneyAfter",     model.MoneyAfter),
         Db.Helper.MakeInParameter("@CostType",       model.CostType),
         Db.Helper.MakeInParameter("@Remarks",        model.Remarks),
         Db.Helper.MakeInParameter("@AddTime",        model.AddTime),
         Db.Helper.MakeInParameter("@ExtraFields",    FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@ExchangeStatus", model.ExchangeStatus),
         Db.Helper.MakeInParameter("@ExpressName",    model.ExpressName),
         Db.Helper.MakeInParameter("@ExpressNum",     model.ExpressNum),
         Db.Helper.MakeInParameter("@SendTime",       model.SendTime),
         Db.Helper.MakeInParameter("@FinishTime",     model.FinishTime),
         Db.Helper.MakeInParameter("@LinkMan",        model.LinkMan),
         Db.Helper.MakeInParameter("@LinkAddress",    model.LinkAddress),
         Db.Helper.MakeInParameter("@LinkPhone",      model.LinkPhone),
         Db.Helper.MakeInParameter("@ID",             model.ID)
     };
     return(paras);
 }
コード例 #12
0
ファイル: SiteRole.cs プロジェクト: syunie/.NETandCloud
 private void fillModel(DbDataReader dr, SiteRoleInfo model)
 {
     model.ID          = dr.GetInt32(0);
     model.Name        = dr.GetString(1);
     model.MenuIDList  = dr.GetString(2);
     model.Remarks     = dr.GetString(3);
     model.ExtraFields = FieldsHelper.XmlDeserialize(dr.GetString(4));
 }
コード例 #13
0
ファイル: MemberFav.cs プロジェクト: syunie/.NETandCloud
 private void fillModel(DbDataReader dr, MemberFavInfo model)
 {
     model.ID          = dr.GetInt32(0);
     model.UserName    = dr.GetString(1);
     model.FavType     = dr.GetString(2);
     model.FavObjID    = dr.GetString(3);
     model.AddTime     = dr.GetDateTime(4);
     model.ExtraFields = FieldsHelper.XmlDeserialize(dr.GetString(5));
 }
コード例 #14
0
 private void fillModel(DbDataReader dr, GoodsCatInfo model)
 {
     model.ID          = dr.GetInt32(0);
     model.Name        = dr.GetString(1);
     model.IsDel       = dr.GetInt32(2);
     model.SortOrder   = dr.GetInt32(3);
     model.Remarks     = dr.GetString(4);
     model.ExtraFields = FieldsHelper.XmlDeserialize(dr.GetString(5));
 }
コード例 #15
0
 private void fillModel(DbDataReader dr, V_CostHistoryInfo model)
 {
     model.ID           = dr.GetInt32(0);
     model.UserName     = dr.GetString(1);
     model.PointsBefore = dr.GetInt32(2);
     model.PointsAfter  = dr.GetInt32(3);
     model.PointsCost   = dr.GetInt32(4);
     model.GoodsID      = dr.GetInt32(5);
     model.GoodsNum     = dr.GetInt32(6);
     model.GoodsName    = dr.GetString(7);
     model.OrderNum     = dr.GetString(8);
     model.MoneyCost    = dr.GetDecimal(9);
     model.MoneyBefore  = dr.GetDecimal(10);
     model.MoneyAfter   = dr.GetDecimal(11);
     model.CostType     = dr.GetString(12);
     model.Remarks      = dr.GetString(13);
     model.AddTime      = dr.GetDateTime(14);
     model.ExtraFields  = FieldsHelper.XmlDeserialize(dr.GetString(15));
     if (!dr.IsDBNull(16))
     {
         model.LineID = dr.GetInt32(16);
     }
     if (!dr.IsDBNull(17))
     {
         model.GroupID = dr.GetInt32(17);
     }
     if (!dr.IsDBNull(18))
     {
         model.BuyNum = dr.GetInt32(18);
     }
     if (!dr.IsDBNull(19))
     {
         model.PromotionID = dr.GetInt32(19);
     }
     if (!dr.IsDBNull(20))
     {
         model.LineName = dr.GetString(20);
     }
     if (!dr.IsDBNull(21))
     {
         model.GoDate = dr.GetDateTime(21);
     }
     if (!dr.IsDBNull(22))
     {
         model.PromotionName = dr.GetString(22);
     }
     if (!dr.IsDBNull(23))
     {
         model.TotalMoney = dr.GetDecimal(23);
     }
     if (!dr.IsDBNull(24))
     {
         model.MoneyPayed = dr.GetDecimal(24);
     }
     model.ExchangeStatus = dr.GetString(25);
 }
コード例 #16
0
ファイル: SiteSetting.cs プロジェクト: syunie/.NETandCloud
 private DbParameter[] makeParameterForUpdate(SiteSettingInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@HotSearchWords", model.HotSearchWords),
         Db.Helper.MakeInParameter("@ExtraFields",    FieldsHelper.XmlSerialize(model.ExtraFields)),
         Db.Helper.MakeInParameter("@ID",             model.ID)
     };
     return(paras);
 }
コード例 #17
0
 private void fillModel(DbDataReader dr, SiteMenuInfo model)
 {
     model.ID          = dr.GetInt32(0);
     model.Name        = dr.GetString(1);
     model.StartTag    = dr.GetString(2);
     model.Url         = dr.GetString(3);
     model.ParentID    = dr.GetInt32(4);
     model.Remarks     = dr.GetString(5);
     model.ExtraFields = FieldsHelper.XmlDeserialize(dr.GetString(6));
 }
コード例 #18
0
ファイル: SiteRole.cs プロジェクト: syunie/.NETandCloud
 private DbParameter[] makeParameterForAdd(SiteRoleInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@Name",        model.Name),
         Db.Helper.MakeInParameter("@MenuIDList",  model.MenuIDList),
         Db.Helper.MakeInParameter("@Remarks",     model.Remarks),
         Db.Helper.MakeInParameter("@ExtraFields", FieldsHelper.XmlSerialize(model.ExtraFields))
     };
     return(paras);
 }
コード例 #19
0
 private DbParameter[] makeParameterForAdd(GoodsCatInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@Name",        model.Name),
         Db.Helper.MakeInParameter("@IsDel",       model.IsDel),
         Db.Helper.MakeInParameter("@SortOrder",   model.SortOrder),
         Db.Helper.MakeInParameter("@Remarks",     model.Remarks),
         Db.Helper.MakeInParameter("@ExtraFields", FieldsHelper.XmlSerialize(model.ExtraFields))
     };
     return(paras);
 }
コード例 #20
0
ファイル: MemberFav.cs プロジェクト: syunie/.NETandCloud
 private DbParameter[] makeParameterForAdd(MemberFavInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@UserName",    model.UserName),
         Db.Helper.MakeInParameter("@FavType",     model.FavType),
         Db.Helper.MakeInParameter("@FavObjID",    model.FavObjID),
         Db.Helper.MakeInParameter("@AddTime",     model.AddTime),
         Db.Helper.MakeInParameter("@ExtraFields", FieldsHelper.XmlSerialize(model.ExtraFields))
     };
     return(paras);
 }
コード例 #21
0
ファイル: Program.cs プロジェクト: windygu/Aspose_Words_NET
            /// <summary>
            /// Converts any fields of the specified type found in the descendants of the node into static text.
            /// </summary>
            /// <param name="compositeNode">The node in which all descendants of the specified FieldType will be converted to static text.</param>
            /// <param name="targetFieldType">The FieldType of the field to convert to static text.</param>
            public static void ConvertFieldsToStaticText(CompositeNode compositeNode, FieldType targetFieldType)
            {
                string       originalNodeText = compositeNode.ToString(SaveFormat.Text); //ExSkip
                FieldsHelper helper           = new FieldsHelper(targetFieldType);

                compositeNode.Accept(helper);

                Debug.Assert(originalNodeText.Equals(compositeNode.ToString(SaveFormat.Text)), "Error: Text of the node converted differs from the original");              //ExSkip
                foreach (Node node in compositeNode.GetChildNodes(NodeType.Any, true))                                                                                      //ExSkip
                {
                    Debug.Assert(!(node is FieldChar && ((FieldChar)node).FieldType.Equals(targetFieldType)), "Error: A field node that should be removed still remains."); //ExSkip
                }
            }
コード例 #22
0
 private DbParameter[] makeParameterForAdd(SiteMenuInfo model)
 {
     DbParameter[] paras =
     {
         Db.Helper.MakeInParameter("@Name",        model.Name),
         Db.Helper.MakeInParameter("@StartTag",    model.StartTag),
         Db.Helper.MakeInParameter("@Url",         model.Url),
         Db.Helper.MakeInParameter("@ParentID",    model.ParentID),
         Db.Helper.MakeInParameter("@Remarks",     model.Remarks),
         Db.Helper.MakeInParameter("@ExtraFields", FieldsHelper.XmlSerialize(model.ExtraFields))
     };
     return(paras);
 }
コード例 #23
0
ファイル: PicWall.cs プロジェクト: syunie/.NETandCloud
 private void fillModel(DbDataReader dr, PicWallInfo model)
 {
     model.ID              = dr.GetInt32(0);
     model.Name            = dr.GetString(1);
     model.CoverPath       = dr.GetString(2);
     model.BigPicPath      = dr.GetString(3);
     model.Remarks         = dr.GetString(4);
     model.AddUserName     = dr.GetString(5);
     model.AddUserRealName = dr.GetString(6);
     model.AddTime         = dr.GetDateTime(7);
     model.SortOrder       = dr.GetInt32(8);
     model.IsTop           = dr.GetInt32(9);
     model.ExtraFields     = FieldsHelper.XmlDeserialize(dr.GetString(10));
 }
コード例 #24
0
ファイル: Program.cs プロジェクト: windygu/Aspose_Words_NET
        //ExEnd

        public static void ConvertFieldsInDocument(string dataDir)
        {
            //ExStart:
            //ExId:FieldsToStaticTextDocument
            //ExSummary:Shows how to convert all fields of a specified type in a document to static text.
            Document doc = new Document(dataDir + "TestFile.doc");

            // Pass the appropriate parameters to convert all IF fields encountered in the document (including headers and footers) to static text.
            FieldsHelper.ConvertFieldsToStaticText(doc, FieldType.FieldIf);

            // Save the document with fields transformed to disk.
            doc.Save(dataDir + "TestFileDocument Out.doc");
            //ExEnd
        }
コード例 #25
0
ファイル: Program.cs プロジェクト: windygu/Aspose_Words_NET
        public static void ConvertFieldsInBody(string dataDir)
        {
            //ExStart:
            //ExId:FieldsToStaticTextBody
            //ExSummary:Shows how to convert all fields of a specified type in a body of a document to static text.
            Document doc = new Document(dataDir + "TestFile.doc");

            // Pass the appropriate parameters to convert PAGE fields encountered to static text only in the body of the first section.
            FieldsHelper.ConvertFieldsToStaticText(doc.FirstSection.Body, FieldType.FieldPage);

            // Save the document with fields transformed to disk.
            doc.Save(dataDir + "TestFileBody Out.doc");
            //ExEnd
        }
コード例 #26
0
 private void fillModel(DbDataReader dr, LineDetailInfo model)
 {
     model.ID              = dr.GetInt32(0);
     model.LineID          = dr.GetInt32(1);
     model.Title           = dr.GetString(2);
     model.DayDesc         = dr.GetString(3);
     model.DayPics         = dr.GetString(4);
     model.SortOrder       = dr.GetInt32(5);
     model.WarmTips        = dr.GetString(6);
     model.Remarks         = dr.GetString(7);
     model.AddUserName     = dr.GetString(8);
     model.AddUserRealName = dr.GetString(9);
     model.AddTime         = dr.GetDateTime(10);
     model.ExtraFields     = FieldsHelper.XmlDeserialize(dr.GetString(11));
 }
コード例 #27
0
        protected override bool OnAddField(FieldsHelper flds, string FcName, string FcAlias = "")
        {
            bool result = false;

            try
            {
                flds.ResetFields(new GdbImporter().GetRecordSetFields(XMLFilePath));
                result = true;
            }
            catch (Exception ex)
            {
                ErrorMessage = ex.Message;
            }
            return(result);
        }
コード例 #28
0
 private void fillModel(DbDataReader dr, SiteUserInfo model)
 {
     model.Name          = dr.GetString(0);
     model.Pwd           = dr.GetString(1);
     model.RealName      = dr.GetString(2);
     model.RoleIDs       = dr.GetString(3);
     model.LastLoginTime = dr.GetDateTime(4);
     model.LastLoginIP   = dr.GetString(5);
     model.ThisLoginTime = dr.GetDateTime(6);
     model.ThisLoginIP   = dr.GetString(7);
     model.InviteNum     = dr.GetString(8);
     model.Remarks       = dr.GetString(9);
     model.UserStatus    = dr.GetString(10);
     model.ExtraFields   = FieldsHelper.XmlDeserialize(dr.GetString(11));
 }
コード例 #29
0
ファイル: OrderDetail.cs プロジェクト: syunie/.NETandCloud
 private void fillModel(DbDataReader dr, OrderDetailInfo model)
 {
     model.ID            = dr.GetInt32(0);
     model.OrderNum      = dr.GetString(1);
     model.GroupID       = dr.GetInt32(2);
     model.LineID        = dr.GetInt32(3);
     model.AddMemberName = dr.GetString(4);
     model.RealName      = dr.GetString(5);
     model.Sex           = dr.GetString(6);
     model.IDNum         = dr.GetString(7);
     model.MobileNum     = dr.GetString(8);
     model.AddTime       = dr.GetDateTime(9);
     model.Remarks       = dr.GetString(10);
     model.ExtraFields   = FieldsHelper.XmlDeserialize(dr.GetString(11));
 }
コード例 #30
0
ファイル: Program.cs プロジェクト: windygu/Aspose_Words_NET
        public static void ConvertFieldsInParagraph(string dataDir)
        {
            //ExStart:
            //ExId:FieldsToStaticTextParagraph
            //ExSummary:Shows how to convert all fields of a specified type in a paragraph to static text.
            Document doc = new Document(dataDir + "TestFile.doc");

            // Pass the appropriate parameters to convert all IF fields to static text that are encountered only in the last
            // paragraph of the document.
            FieldsHelper.ConvertFieldsToStaticText(doc.FirstSection.Body.LastParagraph, FieldType.FieldIf);

            // Save the document with fields transformed to disk.
            doc.Save(dataDir + "TestFileParagraph Out.doc");
            //ExEnd
        }
コード例 #31
0
            /// <summary>
            /// Converts any fields of the specified type found in the descendants of the node into static text.
            /// </summary>
            /// <param name="compositeNode">The node in which all descendants of the specified FieldType will be converted to static text.</param>
            /// <param name="targetFieldType">The FieldType of the field to convert to static text.</param>
            public static void ConvertFieldsToStaticText(CompositeNode compositeNode, FieldType targetFieldType)
            {
                string originalNodeText = compositeNode.ToString(SaveFormat.Text); //ExSkip
                FieldsHelper helper = new FieldsHelper(targetFieldType);
                compositeNode.Accept(helper);

                Debug.Assert(originalNodeText.Equals(compositeNode.ToString(SaveFormat.Text)), "Error: Text of the node converted differs from the original"); //ExSkip
                foreach (Node node in compositeNode.GetChildNodes(NodeType.Any, true)) //ExSkip
                    Debug.Assert(!(node is FieldChar && ((FieldChar)node).FieldType.Equals(targetFieldType)), "Error: A field node that should be removed still remains."); //ExSkip
            }