Beispiel #1
0
        public void UpdateMemberPrintNo(Models.ExportMemberDo entity)
        {
            Models.UpdateMemberResultDo result = new Models.UpdateMemberResultDo();

            db.CreateCommand(new Utils.SQL.SQLCommandHandler((Utils.SQL.ASQLDbCommand command) =>
            {
                command.CommandText = "[dbo].[sp_Update_MemberPrintNo]";
                command.CommandType = System.Data.CommandType.StoredProcedure;

                string memberXML = Utils.ConvertUtil.ConvertToXml_Store <Models.MemberDo>(entity.Members);
                command.AddParameter(typeof(string), "MemberXML", memberXML);

                command.AddParameter(typeof(DateTime), "UpdateDate", entity.UpdateDate);
                command.AddParameter(typeof(string), "UpdateUser", entity.UpdateUser);

                command.ExecuteNonQuery();
            }));
        }
Beispiel #2
0
        public Models.UpdateMemberResultDo CreateMember(Models.MemberDo entity)
        {
            Models.UpdateMemberResultDo result = new Models.UpdateMemberResultDo();

            db.CreateCommand(new Utils.SQL.SQLCommandHandler((Utils.SQL.ASQLDbCommand command) =>
            {
                command.CommandText = "[dbo].[sp_Create_Member]";
                command.CommandType = System.Data.CommandType.StoredProcedure;

                command.AddParameter(typeof(string), "MemberCode", entity.MemberCode);
                command.AddParameter(typeof(int), "MemberTypeID", entity.MemberTypeID);
                command.AddParameter(typeof(int), "BranchID", entity.BranchID);
                command.AddParameter(typeof(int), "RenewTime", entity.RenewTime);
                command.AddParameter(typeof(string), "FirstName", entity.FirstName);
                command.AddParameter(typeof(string), "LastName", entity.LastName);
                command.AddParameter(typeof(DateTime), "BirthDate", entity.BirthDate);
                command.AddParameter(typeof(string), "Gender", entity.Gender);
                command.AddParameter(typeof(string), "Email", entity.Email);
                command.AddParameter(typeof(string), "TelNo", entity.TelNo);
                command.AddParameter(typeof(DateTime), "RegisterDate", entity.RegisterDate);
                command.AddParameter(typeof(DateTime), "ExpireDate", entity.ExpireDate);
                command.AddParameter(typeof(DateTime), "ActivateDate", entity.ActivateDate);
                command.AddParameter(typeof(string), "Address", entity.Address);
                command.AddParameter(typeof(string), "ProvinceID", entity.ProvinceID);
                command.AddParameter(typeof(string), "CantonID", entity.CantonID);
                command.AddParameter(typeof(string), "DistrictID", entity.DistrictID);
                command.AddParameter(typeof(string), "ZipCode", entity.ZipCode);
                command.AddParameter(typeof(bool), "FlagActive", entity.FlagActive);

                command.AddParameter(typeof(DateTime), "CreateDate", entity.CreateDate);
                command.AddParameter(typeof(string), "CreateUser", entity.CreateUser);

                List <Models.MemberDo> list = command.ToList <Models.MemberDo>();
                if (list != null)
                {
                    if (list.Count > 0)
                    {
                        result.Member = list[0];
                    }
                }
            }));

            return(result);
        }