Exemplo n.º 1
0
        //查看,编辑,删除
        protected void gv_CargoList_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            GridView senderGrid = sender as GridView;

            //更新或删除前对消息Label清空
            if (e.CommandName == "Edit" || e.CommandName == "Update" || e.CommandName == "Delete")
            {
                lblGridViewMsg.Text = "";
                //ClearTipMsgLabel();//清除提示信息
            }
            else if (e.CommandName == "ViewDetail")
            {
                GridViewRow drv        = ((GridViewRow)(((LinkButton)(e.CommandSource)).Parent.Parent)); //此得出的值是表示那行被选中的索引值
                Label       lblSCPCode = drv == null ? null : drv.FindControl("lblSCPCode") as Label;

                string EditID = lblSCPCode.Text;
                System.Text.StringBuilder url = new System.Text.StringBuilder("~/Query/StockCountingPlanView.aspx?");
                url.Append("EditID=");
                url.Append(EditID); //"~/BaseInfoSetting/WareHouseEdit.aspx?EditType=2";
                Response.Redirect(url.ToString());
            }
            else if (e.CommandName == "MyEdit")
            {
                GridViewRow drv        = ((GridViewRow)(((LinkButton)(e.CommandSource)).Parent.Parent)); //此得出的值是表示那行被选中的索引值
                Label       lblSCPCode = drv == null ? null : drv.FindControl("lblSCPCode") as Label;
                //QueryString中EditType 1为新增 2为编辑
                //QueryString中EditID 0表示不编辑 1表示编辑
                string EditID = lblSCPCode.Text;
                lblGridViewMsg.Text = "";

                System.Text.StringBuilder url = new System.Text.StringBuilder("~/Query/StockCountingPlanEdit.aspx?EditType=2");
                url.Append("&EditID=");
                url.Append(EditID); //"~/BaseInfoSetting/WareHouseEdit.aspx?EditType=2";
                Response.Redirect(url.ToString());
            }
            else if (e.CommandName == "MyDelete")
            {
                try
                {
                    GridViewRow drv        = ((GridViewRow)(((LinkButton)(e.CommandSource)).Parent.Parent)); //此得出的值是表示那行被选中的索引值
                    Label       lblSCPCode = drv == null ? null : drv.FindControl("lblSCPCode") as Label;
                    //QueryString中EditType 1为新增 2为编辑
                    //QueryString中EditID 0表示不编辑 1表示编辑
                    string EditID = lblSCPCode.Text;


                    lblGridViewMsg.Text = "";

                    //更新时,先删除全部明细表的行,再新增所有本次选中的层位对应的明细行
                    using (GoldEntities context = new GoldEntities())
                    {
                        //查出待删除的计划单
                        StockCountingPlan delModel = (from r in context.StockCountingPlan where r.SCPCode == EditID select r).FirstOrDefault();
                        //查出待删除的明细单
                        List <StockCountingDetail> delDetailList = (from r in context.StockCountingDetail where r.SCPCode == EditID select r).ToList <StockCountingDetail>();

                        //删除明细行
                        foreach (StockCountingDetail d in delDetailList)
                        {
                            context.StockCountingDetail.DeleteObject(d);
                        }
                        //删除计划单
                        context.StockCountingPlan.DeleteObject(delModel);

                        int AffectRowsCount = context.SaveChanges();
                        lblGridViewMsg.Text = "盘点计划单[" + EditID + "]删除成功![影响行数" + AffectRowsCount.ToString() + "]";

                        GridViewBind();//删除完成后重新绑定盘点计划单
                    }
                }
                catch (Exception ex)
                {
                    lblGridViewMsg.Text = "删除失败![" + Utility.LogHelper.GetExceptionMsg(ex) + "]";
                }


                //lblGridViewMsg.Text = "已删除";
            }
        }
Exemplo n.º 2
0
        void GridViewBind()
        {
            try
            {
                string scpCode = ViewState["EditID"].ToString();


                using (DAL.GoldEntities context = new DAL.GoldEntities())
                {
                    //查询基本信息
                    StockCountingPlan planModel = (from r in context.StockCountingPlan where r.SCPCode == scpCode select r).FirstOrDefault();
                    if (planModel != null)
                    {
                        lblSCPCodeShow.Text = planModel.SCPCode;
                        lblWHName.Text      = planModel.WHName;
                        EnumData.SCPStatusEnum status = (EnumData.SCPStatusEnum)Enum.Parse(typeof(EnumData.SCPStatusEnum), planModel.SCPStatus.Value.ToString());
                        lblStatusShow.Text = EnumData.GetEnumDesc(status);
                        EnumData.SCPTypeEnum types = (EnumData.SCPTypeEnum)Enum.Parse(typeof(EnumData.SCPTypeEnum), planModel.SCPType.Value.ToString());
                        lblType.Text       = EnumData.GetEnumDesc(types);
                        lblCreateTime.Text = planModel.CreateDate.ToString();

                        if (lblStatusShow.Text == EnumData.GetEnumDesc(EnumData.SCDetailStatusEnum.Complete))//结束盘点的按钮不可用
                        {
                            btnFinish.Enabled  = false;
                            btnFinish.CssClass = "ButtonImageStyleEnableFalse";
                        }
                    }


                    var queryResult = (from r in context.StockCountingDetail
                                       where r.SCPCode == scpCode
                                       select r).ToList();

                    foreach (var d in queryResult)
                    {
                        DateTime FinishTime = DateTime.Now;                        //如果盘点未结束则计算盘点开始至当前时间段内的出入数量
                        if (d.Status == (int)EnumData.SCDetailStatusEnum.Complete) //如果盘点已经结束则计算盘点开始和结束之间的出入数量
                        {
                            FinishTime = d.CountingEndTime.Value;
                        }

                        //台账中ChangeType 1,3出,2,4入

                        //此层位此商品 盘点至今/结束的入库数量
                        double?sumIn = (from r in context.InventoryBook
                                        where r.WHCode == planModel.WHCode &&
                                        r.CargoCode == d.CargoCode &&
                                        r.BinCode == d.BinCode &&
                                        (r.ChangeType == 2 || r.ChangeType == 4) &&
                                        r.ChangeTime >= planModel.CreateDate &&
                                        r.ChangeTime <= FinishTime
                                        select r.NumAdd).Sum();
                        //此层位此商品 盘点至今/结束的出库数量
                        double?sumOut = (from r in context.InventoryBook
                                         where r.WHCode == planModel.WHCode &&
                                         r.CargoCode == d.CargoCode &&
                                         r.BinCode == d.BinCode &&
                                         (r.ChangeType == 1 || r.ChangeType == 3) &&
                                         r.ChangeTime >= planModel.CreateDate &&
                                         r.ChangeTime <= FinishTime
                                         select r.NumDel).Sum();

                        d.PeriodInNum  = sumIn == null ? 0 : sumIn;
                        d.PeriodOutNum = sumOut == null ? 0 : sumOut;

                        if (d.NumActual != null)
                        {
                            d.NumDifference = d.NumActual - (d.NumPlan + d.PeriodInNum - d.PeriodOutNum);
                        }
                    }

                    string        sortExpression = gv_CargoList.Attributes["sortExpression"];
                    SortDirection sortDirection  = gv_CargoList.Attributes["sortDirection"] == "ASC" ? SortDirection.Ascending : SortDirection.Descending;

                    if (sortDirection == SortDirection.Ascending)
                    {
                        queryResult = queryResult.OrderBy(r => r.GetType().GetProperty(sortExpression).GetValue(r, null)).ToList();
                    }
                    else
                    {
                        queryResult = queryResult.OrderByDescending(r => r.GetType().GetProperty(sortExpression).GetValue(r, null)).ToList();
                    }

                    gv_CargoList.DataSource = queryResult;
                    gv_CargoList.DataBind();
                }
            }
            catch (Exception ex)
            {
                lblGridViewMsg.Text = "查询出现异常!" + Utility.LogHelper.GetExceptionMsg(ex);
            }
            finally
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Guid.NewGuid().ToString(), "hiddenWaitDiv('divWait');", true);//js提示
            }
        }
Exemplo n.º 3
0
        //结束盘点任务
        protected void btnFinish_Click(object sender, EventArgs e)
        {
            try
            {
                lblGridViewMsg.Text = "";


                using (GoldEntities context = new GoldEntities())
                {
                    string scpCode = lblSCPCodeShow.Text;
                    foreach (GridViewRow row in gv_CargoList.Rows)
                    {
                        /*
                         * lblSCPCode
                         * lblDetailRowNumber
                         * lblNumPlan
                         * lblPeriodInNum
                         * lblPeriodOutNum
                         * lblNumActual
                         * lblNumDifference
                         */

                        Label lblDetailRowNumber = row.FindControl("lblDetailRowNumber") as Label;
                        //Label lblNumPlan = row.FindControl("lblNumPlan") as Label;
                        Label lblPeriodInNum  = row.FindControl("lblPeriodInNum") as Label;
                        Label lblPeriodOutNum = row.FindControl("lblPeriodOutNum") as Label;
                        //Label lblNumActual = row.FindControl("lblNumActual") as Label;
                        Label lblNumDifference = row.FindControl("lblNumDifference") as Label;


                        string DetailRowNumber = lblDetailRowNumber.Text.Trim();
                        //double NumPlan=0;
                        double PeriodInNum  = 0;
                        double PeriodOutNum = 0;
                        //double NumActual=0;
                        double NumDifference = 0;

                        //if(lblNumActual!=null&&lblNumActual.Text.Trim()!="")
                        //    NumActual=double.Parse(lblNumActual.Text);
                        if (lblPeriodInNum != null && lblPeriodInNum.Text.Trim() != "")
                        {
                            PeriodInNum = double.Parse(lblPeriodInNum.Text);
                        }
                        if (lblPeriodOutNum != null && lblPeriodOutNum.Text.Trim() != "")
                        {
                            PeriodOutNum = double.Parse(lblPeriodOutNum.Text);
                        }
                        if (lblNumDifference != null && lblNumDifference.Text.Trim() != "")
                        {
                            NumDifference = double.Parse(lblNumDifference.Text);
                        }

                        StockCountingDetail updateModel = (from r in context.StockCountingDetail where r.SCPCode == scpCode && r.DetailRowNumber == DetailRowNumber select r).FirstOrDefault();

                        updateModel.PeriodInNum   = PeriodInNum;
                        updateModel.PeriodOutNum  = PeriodOutNum;
                        updateModel.NumDifference = NumDifference;
                    }

                    StockCountingPlan planModel = (from r in context.StockCountingPlan where r.SCPCode == scpCode select r).FirstOrDefault();
                    planModel.SCPStatus = (int)EnumData.SCPStatusEnum.Finished;
                    if (Session["UserInfo"] != null)
                    {
                        Users LoginUser = Session["UserInfo"] as Users;
                        planModel.FinishPersonID   = LoginUser.UserId;
                        planModel.FinishPersonName = LoginUser.UserName;
                    }
                    planModel.FinishDate = DateTime.Now;

                    int AffectRowsCount = context.SaveChanges();
                    lblGridViewMsg.Text = "盘点计划单[" + scpCode + "]成功结束![影响行数" + AffectRowsCount.ToString() + "]";

                    btnFinish.Enabled  = false;
                    btnFinish.CssClass = "ButtonImageStyleEnableFalse";

                    GridViewBind();//删除完成后重新绑定盘点计划单
                }
            }
            catch (Exception ex)
            {
                lblGridViewMsg.Text = "操作失败![" + Utility.LogHelper.GetExceptionMsg(ex) + "]";
            }
        }
Exemplo n.º 4
0
        private void LoadInfo(string ItemID)
        {
            using (GoldEntities context = new GoldEntities())
            {
                //绑定盘点计划单状态
                List <NameValueModel> ListBinType = Gold.Utility.EnumData.GetEnumsList(typeof(Gold.Utility.EnumData.SCPTypeEnum));
                DropDownList_SCPType.Items.Clear();
                DropDownList_SCPType.DataTextField  = "Name";
                DropDownList_SCPType.DataValueField = "Value";
                DropDownList_SCPType.DataSource     = ListBinType;
                DropDownList_SCPType.DataBind();
                DropDownList_SCPType.Items.Insert(0, new ListItem("", ""));

                //绑定仓库
                var result = (from r in context.WareHouse select new { r.WHCode, r.WHName }).OrderBy(r => r.WHCode).ToList();
                DropDownList_WHCode.Items.Clear();
                DropDownList_WHCode.DataTextField  = "WHName";
                DropDownList_WHCode.DataValueField = "WHCode";
                DropDownList_WHCode.DataSource     = result;
                DropDownList_WHCode.DataBind();
                DropDownList_WHCode.Items.Insert(0, new ListItem("", ""));

                string defaultWHCode = WebConfigHelper.Instance.GetAppSettingValue("DefaultWHCode");
                DropDownList_WHCode.SelectedIndex = DropDownList_WHCode.Items.IndexOf(DropDownList_WHCode.Items.FindByValue(defaultWHCode));
                DropDownList_WHCode.Enabled       = false;//目前只支持对地王26库的盘点,故仓库选项禁用

                //货架名称 例如A架
                var BinCodeFirstLetterList = (from r in context.StorageBin orderby r.BinCode.Substring(0, 1) select new { BinShort = r.BinCode.Substring(0, 1) }).Distinct();

                //层位名
                var BinCodeTotalCodeList = (from r in context.StorageBin orderby r.BinCode select r.BinCode);

                //层中小区域名及每个小区域数量
                var CargoTagBinCodeAndNumberList = (from r in context.CargoTag orderby r.BinCode group r by r.BinCode into x select new { BinCode = x.Key, Number = x.Sum(r => r.Number) });

                //编辑状态下进入此页面时
                if (ItemID != "-1")
                {
                    StockCountingPlan existModel = (from r in context.StockCountingPlan where r.SCPCode == ItemID select r).FirstOrDefault();

                    if (existModel != null)
                    {
                        List <StockCountingDetail> detailList = (from r in context.StockCountingDetail where r.SCPCode == existModel.SCPCode select r).ToList <StockCountingDetail>();
                        tbxSCPCode.Text = existModel.SCPCode;
                        //设置选中项
                        DropDownList_SCPType.SelectedIndex = DropDownList_SCPType.Items.IndexOf(DropDownList_SCPType.Items.FindByValue(existModel.SCPType.Value.ToString()));

                        tbxComment.Text = existModel.Comment;

                        //将数据导入到TreeView中
                        foreach (var binCodeFirstLetter in BinCodeFirstLetterList)
                        {
                            TreeNode FirstLevelNode = new TreeNode(binCodeFirstLetter.BinShort, binCodeFirstLetter.BinShort);
                            FirstLevelNode.Collapse();
                            TreeView_Scope.Nodes.Add(FirstLevelNode);

                            var TempBinCodeTotalCodeList = (from r in BinCodeTotalCodeList where r.StartsWith(binCodeFirstLetter.BinShort) select r);
                            foreach (var binCodeTotalCode in TempBinCodeTotalCodeList)
                            {
                                TreeNode SecondLevelNode = new TreeNode(binCodeTotalCode, binCodeTotalCode);
                                FirstLevelNode.ChildNodes.Add(SecondLevelNode);

                                var TempCargoTagBinCodeAndNumberList = (from r in CargoTagBinCodeAndNumberList where r.BinCode.StartsWith(binCodeTotalCode) select r);
                                foreach (var temp in TempCargoTagBinCodeAndNumberList)
                                {
                                    string ShowName = temp.BinCode + "&nbsp;&nbsp;[现存" + (temp.Number == null ? "0" : temp.Number.Value.ToString()).PadLeft(5, ' ') + "枚]";

                                    TreeNode ThirdLevelNode = new TreeNode(ShowName, temp.BinCode);
                                    SecondLevelNode.ChildNodes.Add(ThirdLevelNode);

                                    //判断是否在计划单中,若在计划单中则选中
                                    var existInThePlan = (from r in detailList where r.BinCode == temp.BinCode select r).FirstOrDefault();
                                    if (existInThePlan != null)
                                    {
                                        ThirdLevelNode.Checked = true;
                                        if (ThirdLevelNode.Parent != null)//如果节点上级不为空则展开该节点
                                        {
                                            ThirdLevelNode.Parent.Expand();
                                            if (ThirdLevelNode.Parent.Parent != null)
                                            {
                                                ThirdLevelNode.Parent.Parent.Expand();
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                else
                {
                    //将数据导入到TreeView中
                    foreach (var binCodeFirstLetter in BinCodeFirstLetterList)
                    {
                        TreeNode FirstLevelNode = new TreeNode(binCodeFirstLetter.BinShort, binCodeFirstLetter.BinShort);
                        FirstLevelNode.Collapse();

                        var TempBinCodeTotalCodeList = (from r in BinCodeTotalCodeList where r.StartsWith(binCodeFirstLetter.BinShort) select r);
                        foreach (var binCodeTotalCode in TempBinCodeTotalCodeList)
                        {
                            TreeNode SecondLevelNode = new TreeNode(binCodeTotalCode, binCodeTotalCode);

                            var TempCargoTagBinCodeAndNumberList = (from r in CargoTagBinCodeAndNumberList where r.BinCode.StartsWith(binCodeTotalCode) select r);
                            foreach (var temp in TempCargoTagBinCodeAndNumberList)
                            {
                                string ShowName = temp.BinCode + "&nbsp;&nbsp;[现存" + (temp.Number == null ? "0" : temp.Number.Value.ToString()).PadLeft(5, ' ') + "枚]";

                                TreeNode ThirdLevelNode = new TreeNode(ShowName, temp.BinCode);
                                SecondLevelNode.ChildNodes.Add(ThirdLevelNode);
                            }

                            FirstLevelNode.ChildNodes.Add(SecondLevelNode);
                        }
                        TreeView_Scope.Nodes.Add(FirstLevelNode);
                    }
                }
            }
        }
Exemplo n.º 5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                lblSaveMsg.Text = "";
                string outMsg = "";
                if (ViewState["EditType"].ToString() == "1")//新增Insert
                {
                    StockCountingPlan          newModel   = new StockCountingPlan();
                    List <StockCountingDetail> ListDetail = new List <StockCountingDetail>();

                    bool getNewOK = GetNewModel(out newModel, out ListDetail, out outMsg);
                    if (getNewOK == false)
                    {
                        lblSaveMsg.Text = "新增失败![" + outMsg + "]";
                        return;
                    }
                    using (GoldEntities context = new GoldEntities())
                    {
                        //新增计划表
                        context.StockCountingPlan.AddObject(newModel);

                        //新增盘点表
                        foreach (StockCountingDetail sd in ListDetail)
                        {
                            context.StockCountingDetail.AddObject(sd);
                        }

                        int AffectRowsCount = context.SaveChanges();
                        lblSaveMsg.Text  = "保存成功![影响行数" + AffectRowsCount.ToString() + "]";
                        btnSave.Enabled  = false;
                        btnSave.CssClass = "ButtonImageStyleEnableFalse";
                    }
                }
                else//更新Update
                {
                    //更新时,先删除全部明细表的行,再新增所有本次选中的层位对应的明细行
                    using (GoldEntities context = new GoldEntities())
                    {
                        string EditID = ViewState["EditID"].ToString();

                        List <StockCountingDetail> OldListDetail = new List <StockCountingDetail>();
                        List <StockCountingDetail> ListDetail    = new List <StockCountingDetail>();

                        StockCountingPlan updateModel = (from r in context.StockCountingPlan where r.SCPCode == EditID select r).FirstOrDefault();
                        if (updateModel != null)
                        {
                            if (updateModel.SCPStatus.Value != (int)EnumData.SCPStatusEnum.Initial)
                            {
                                lblSaveMsg.Text = "更新失败![该盘点计划单不是初始状态,不能进行修改]";
                                return;
                            }

                            bool getUpdateOK = GetUpdateModel(ref updateModel, out ListDetail, out outMsg);
                            if (getUpdateOK == false)
                            {
                                lblSaveMsg.Text = "更新失败![" + outMsg + "]";
                                return;
                            }

                            OldListDetail = (from r in context.StockCountingDetail where r.SCPCode == updateModel.SCPCode select r).ToList <StockCountingDetail>();

                            //先删除旧有的明细行
                            foreach (StockCountingDetail del in OldListDetail)
                            {
                                context.StockCountingDetail.DeleteObject(del);
                            }

                            //再新增本次选中的明细行
                            foreach (StockCountingDetail add in ListDetail)
                            {
                                context.StockCountingDetail.AddObject(add);
                            }

                            int AffectRowsCount = context.SaveChanges();
                            lblSaveMsg.Text  = "保存成功![影响行数" + AffectRowsCount.ToString() + "]";
                            btnSave.Enabled  = false;
                            btnSave.CssClass = "ButtonImageStyleEnableFalse";
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                lblSaveMsg.Text = "更新失败![" + Utility.LogHelper.GetExceptionMsg(ex) + "]";
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 根据界面数据填充更新的对象
        /// </summary>
        /// <param name="updateModel">传入此方法之前应先查询此对象所有值</param>
        /// <param name="detailList">当前所有选中的层位对应的明细</param>
        /// <param name="msg"></param>
        /// <returns></returns>
        private bool GetUpdateModel(ref StockCountingPlan updateModel, out List <StockCountingDetail> detailList, out string msg)
        {
            msg        = "";
            detailList = new List <StockCountingDetail>();
            try
            {
                //updateModel.SCPCode = DAL.KeyGenerator.Instance.GetStockCountingPlanKey();//获取自动生成序列盘点计划单号
                updateModel.SCPCode = tbxSCPCode.Text.Trim();

                if (DropDownList_SCPType.SelectedItem == null || DropDownList_WHCode.SelectedItem == null ||
                    DropDownList_SCPType.SelectedItem.Text.Trim() == "" || DropDownList_WHCode.SelectedItem.Text.Trim() == "")
                {
                    msg = "盘点类型和盘点仓库不能为空,请选择!";
                    return(false);
                }

                updateModel.SCPType = int.Parse(DropDownList_SCPType.Text == "" ? null : DropDownList_SCPType.SelectedItem.Value.Trim());

                updateModel.WHCode = DropDownList_WHCode.SelectedItem.Value.ToString();
                updateModel.WHName = DropDownList_WHCode.SelectedItem.Text;
                if (Session["UserInfo"] != null)
                {
                    Users LoginUser = Session["UserInfo"] as Users;
                    updateModel.CreatorID   = LoginUser.UserId;
                    updateModel.CreatorName = LoginUser.UserName;
                }
                updateModel.CreateDate = DateTime.Now;
                updateModel.Comment    = tbxComment.Text.Trim();

                List <string> BinCodeList = GetTreeViewCheckedNode();

                if (BinCodeList.Count == 0)
                {
                    msg = "必须选择盘点层位范围!";
                    return(false);
                }

                using (GoldEntities context = new GoldEntities())
                {
                    var result = (from r in context.CargoTag where BinCodeList.Contains(r.BinCode) && r.CargoCode != null && r.CargoCode != "" select r);

                    //获取最大值
                    string        scpCode          = updateModel.SCPCode;
                    List <string> rowNumberList    = (from r in context.StockCountingDetail where r.SCPCode == scpCode select r.DetailRowNumber).ToList <string>();
                    List <int>    rowNumberIntList = rowNumberList.ConvertAll <int>(ConvertStringToInt);
                    int           maxRowNumber     = rowNumberIntList.Count == 0 ? 0 : rowNumberIntList.Max();

                    foreach (var temp in result)
                    {
                        maxRowNumber++;

                        StockCountingDetail newObj = new StockCountingDetail();
                        newObj.SCPCode           = updateModel.SCPCode;
                        newObj.DetailRowNumber   = maxRowNumber.ToString().PadLeft(3, '0');;//因为此处明细行是作为新增数据处理,所以设置行号
                        newObj.CargoCode         = temp.CargoCode;
                        newObj.CargoName         = temp.Cargos.CargoName;
                        newObj.CargoModel        = temp.Cargos.CargoModel;
                        newObj.CargoSpec         = temp.Cargos.CargoSpec;
                        newObj.CargoUnits        = temp.Cargos.CargoUnits;
                        newObj.BinCode           = temp.BinCode;
                        newObj.NumPlan           = temp.Number;//商品标签表中存储的商品数量
                        newObj.NumActual         = null;
                        newObj.PeriodInNum       = null;
                        newObj.PeriodOutNum      = null;
                        newObj.NumDifference     = null;
                        newObj.CountingEndTime   = null;
                        newObj.CountingStartTime = updateModel.CreateDate;//DateTime.Now;//盘点开始时间即为创建时间
                        newObj.Status            = (int)EnumData.SCDetailStatusEnum.Uncompleted;
                        newObj.ActorID           = null;
                        newObj.ActorName         = null;

                        detailList.Add(newObj);
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                msg = ex.Message.ToString();
                return(false);
            }
        }