public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Charset     = "utf-8";
            HttpPostedFile file = context.Request.Files["Filedata"];


            if (file != null)
            {
                string AreaId = context.Request.Form["AreaId"];
                IList <StringObjectDictionary> datas      = NPOIManager.GetSheetData(file.InputStream, 0, true);
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                FamilyMember familyMember = new FamilyMember()
                {
                    DataSource = GlobalManager.DIKey_00012_UploadFile, OperatedBy = NormalSession.UserId.ToGuid(), OperatedOn = DateTime.Now, AreaId = AreaId
                };
                foreach (var data in datas)
                {
                    familyMember.FamilyMemberId = Guid.NewGuid();
                    StringObjectDictionary       sod      = familyMember.ToStringObjectDictionary(false);
                    IDictionary <string, object> dataItem = sod.MixInObject(data, false, e0571.web.core.Other.CaseSensitive.NORMAL);

                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = familyMember.GetCreateMethodName(), ParameterObject = dataItem, Type = SqlExecuteType.INSERT
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                //下面这句代码缺少的话,上传成功后上传队列的显示不会自动消失
                context.Response.Write("1");
            }
            else
            {
                context.Response.Write("0");
            }
        }
        public InvokeResult NullifySelected(string strFamilyMemberIds)
        {
            InvokeResult result = new InvokeResult {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrFamilyMemberIds = strFamilyMemberIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrFamilyMemberIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }

                string statementName = new FamilyMember().GetUpdateMethodName();
                foreach (string strFamilyMemberId in arrFamilyMemberIds)
                {
                    FamilyMember familyMember = new FamilyMember {
                        FamilyMemberId = strFamilyMemberId.ToGuid(), Status = 0
                    };
                    /***********************begin 自定义代码*******************/
                    familyMember.OperatedBy = NormalSession.UserId.ToGuid();
                    familyMember.OperatedOn = DateTime.Now;
                    familyMember.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                    /***********************end 自定义代码*********************/
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = familyMember.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <FamilyMemberPK> Nullify(string strFamilyMemberId)
        {
            ModelInvokeResult <FamilyMemberPK> result = new ModelInvokeResult <FamilyMemberPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_FamilyMemberId = strFamilyMemberId.ToGuid();
                if (_FamilyMemberId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                FamilyMember familyMember = new FamilyMember {
                    FamilyMemberId = _FamilyMemberId, Status = 0
                };
                /***********************begin 自定义代码*******************/
                familyMember.OperatedBy = NormalSession.UserId.ToGuid();
                familyMember.OperatedOn = DateTime.Now;
                familyMember.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                /***********************end 自定义代码*********************/

                statements.Add(new IBatisNetBatchStatement {
                    StatementName = familyMember.GetUpdateMethodName(), ParameterObject = familyMember.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });

                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new FamilyMemberPK {
                    FamilyMemberId = _FamilyMemberId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <FamilyMemberPK> Create(FamilyMember familyMember)
        {
            ModelInvokeResult <FamilyMemberPK> result = new ModelInvokeResult <FamilyMemberPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                if (familyMember.FamilyMemberId == GlobalManager.GuidAsAutoGenerate)
                {
                    familyMember.FamilyMemberId = Guid.NewGuid();
                }
                /***********************begin 自定义代码*******************/
                familyMember.OperatedBy = NormalSession.UserId.ToGuid();
                familyMember.OperatedOn = DateTime.Now;
                familyMember.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                familyMember.InputCode1 = GetInputCode(familyMember.FamilyMemberName, "py");
                familyMember.InputCode2 = GetInputCode(familyMember.FamilyMemberName, "wb");
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = familyMember.GetCreateMethodName(), ParameterObject = familyMember.ToStringObjectDictionary(false), Type = SqlExecuteType.INSERT
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new FamilyMemberPK {
                    FamilyMemberId = familyMember.FamilyMemberId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }