Exemplo n.º 1
0
        void AdInfoSearchForm_DoubleClick(object sender, EventArgs e)
        {
            Xceed.Grid.DataCell cell = sender as Xceed.Grid.DataCell;
            var row = cell.ParentRow;
            var dmc = ServiceProvider.GetService <IApplication>().ExecuteAction(row.Cells["Table"].Value.ToString()) as IDisplayManagerContainer;

            dmc.DisplayManager.SearchManager.LoadData(SearchExpression.Eq(row.Cells["Column"].Value.ToString(), row.Cells["Value"].Value.ToString()), null);
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ISearchExpression GetSearchExpression()
        {
            if (this.Value != null && this.Value != this.NullValue && this.Value.ToString() != this.NullText)
            {
                GridColumnInfo info = this.ParentColumn.Tag as GridColumnInfo;
                if (info != null)
                {
                    string searchPropertyName = GetSearchPropertyName(info);

                    ISearchExpression ret = SearchExpression.Like(searchPropertyName, this.Value);

                    object searchValue = this.Value;
                    if (searchValue != null && info.CellViewerManager == "Combo")
                    {
                        string nvName = Feng.Windows.Utils.GridColumnInfoHelper.GetNameValueMappingName(info, true);
                        searchValue = Feng.Utils.NameValueControlHelper.GetMultiValue(nvName, searchValue.ToString());

                        ret = SearchExpression.Or(ret, SearchExpression.Eq(searchPropertyName, searchValue));
                    }

                    return(ret);
                }
            }

            return(null);
            //object value;
            //if (this.IsBeingEdited)
            //{
            //    value = ((FilterEditor)this.CellEditorManager).TemplateControl.SelectedValue;
            //}
            //else
            //{
            //    value = this.Value;
            //}

            //if (m_filterItems.ContainsKey(value.ToString()))
            //{
            //    return m_filterItems[value.ToString()];
            //}
            //else
            //{
            //    // 因为Filter有保存,但是里面的内容有变化,所以可能产生无内容的情况
            //    // this.Value = s_anyText; // 但是还是保存Value
            //    return m_filterItems[s_anyText];
            //}
        }
Exemplo n.º 3
0
        private void SetTopGrid()
        {
            if (用途分类.SelectedDataValue == null)
            {
                return;
            }

            凭证用途分类 ytfl = (凭证用途分类)用途分类.SelectedDataValue;

            if (ytfl == 凭证用途分类.业务应付)
            {
                if (付款对象.SelectedDataValue == null)
                {
                    return;
                }
                ArchiveFormFactory.SetupDataUnboundGrid(grdTop, ADInfoBll.Instance.GetWindowTabInfo("资金票据_应收应付当前"));
                grdTop.DisplayManager.SearchManager.LoadData(SearchExpression.And(SearchExpression.Eq("相关人", 付款对象.SelectedDataValue),
                                                                                  SearchExpression.Eq("收付标志", Hd.Model.收付标志.付)), null);
            }
        }
Exemplo n.º 4
0
        void DisplayManager_PositionChanged(object sender, EventArgs e)
        {
            Clear(false);

            转关箱排车暂存组 entity = m_暂存计划区Grid.DisplayManager.CurrentItem as 转关箱排车暂存组;

            if (entity == null)
            {
                btn计算机辅助优化.Enabled = false;
                btn全自动化.Enabled    = false;
                btn确认.Enabled      = false;
                btn暂存.Enabled      = false;
                btn重排.Enabled      = false;
                btn打印.Enabled      = false;
                return;
            }

            if (entity.IsActive)
            {
                btn计算机辅助优化.Enabled = false;
                btn全自动化.Enabled    = false;
                btn确认.Enabled      = false;
                btn暂存.Enabled      = false;
                btn重排.Enabled      = false;
            }
            else
            {
                btn计算机辅助优化.Enabled = true;
                btn全自动化.Enabled    = true;
                btn确认.Enabled      = true;
                btn暂存.Enabled      = true;
                btn重排.Enabled      = true;
            }

            m_待排转关箱任务区Grid.DisplayManager.SearchManager.LoadData(SearchExpression.Eq("暂存组", entity.ID), null);
            m_待排转关箱任务区Grid.DisplayManager.SearchManager.WaitLoadData();

            Load排车任务(entity);
        }
Exemplo n.º 5
0
        //private 任务Dao m_rwDao = new 任务Dao();

        private void 进口箱批量任务录入_Load(object sender, EventArgs e)
        {
            m_暂存区Grid = base.AssociateArchiveGrid(pnl暂存区, "任务备案_进口箱批量任务确认_暂存区") as ArchiveUnboundGrid;
            m_cm      = m_暂存区Grid.ControlManager as IWindowControlManager <进口票>;

            m_显示区Grid = MyTemplateForm.AssociateArchiveDetailGrid(pnl显示区, "任务备案_进口箱批量任务确认_显示区", m_cm, m_cm.Dao as IRelationalDao) as ArchiveUnboundGrid;
            m_cm2     = m_显示区Grid.ControlManager as IWindowControlManager <任务>;

            base.AssociateDataControls(new Control[] {
                pnl任务性质, pnl转关箱标志, pnl委托人, pnl委托时间, pnl委托联系人, pnl提单号,
                pnl船名, pnl航次, pnl提箱时间要求, pnl还箱进港时间要求,
                pnl备注, pnl总箱量, pnl提单号, pnl箱属船公司
            }, m_cm.DisplayManager, m_gridName);

            m_cm.StateControls.Add(new StateControl(btn修改, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn拒绝, StateType.View));
            m_cm.StateControls.Add(new StateControl(btn放弃, false));
            m_cm.StateControls.Add(new StateControl(btn备案确认, StateType.View | StateType.Add | StateType.Edit));

            m_cm.DisplayManager.DataControls["委托人编号"].SelectedDataValueChanged += new EventHandler(任务预备案_委托人编号_SelectedDataValueChanged);

            m_cm.DisplayManager.PositionChanging += new Feng.CancelEventHandler(DisplayManager_PositionChanging);
            m_cm.DisplayManager.PositionChanged  += new EventHandler(DisplayManager_PositionChanged);

            Helper.SetGridDefault(this, m_暂存区Grid);

            if (m_提单号 == null)
            {
                m_cm.DisplayManager.SearchManager.LoadData();
            }
            else
            {
                btn修改.Enabled = false;
                m_cm.DisplayManager.SearchManager.AdditionalSearchExpression = null;
                m_cm.DisplayManager.SearchManager.LoadData(SearchExpression.Eq("提单号", m_提单号), null);
            }
        }
Exemplo n.º 6
0
        private void 单车后续作业计划_Load(object sender, EventArgs e)
        {
            if (m_cl != null)
            {
                using (IRepository rep = ServiceProvider.GetService <IRepositoryFactory>().GenerateRepository <车辆作业>())
                {
                    var cl = rep.Get <车辆>(m_cl.ID);

                    txt车型.Text   = cl.车型;
                    txt车主.Text   = cl.车主.简称;
                    txt承运车辆.Text = cl.车牌号;
                    txt核定载重.Text = cl.核定载重;
                    txt监管车.Text  = cl.监管车 ? "是" : "否";
                    txt联系电话.Text = cl.主驾驶员.联系方式;
                }

                var rightGrid = base.AssociateBoundGrid(pnl车辆作业集合, "车队级调度_静态任务下达_单车后续作业计划");
                rightGrid.DisplayManager.SearchManager.LoadData(SearchExpression.And(
                                                                    SearchExpression.Eq("车辆作业:车辆", m_cl), SearchExpression.IsNull("车辆作业:结束时间")),
                                                                new List <ISearchOrder> {
                    SearchOrder.Asc("车辆作业:Created")
                });
            }
        }
Exemplo n.º 7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="searchExpression"></param>
        /// <param name="searchOrders"></param>
        /// <param name="parentItem"></param>
        /// <returns></returns>
        public override System.Collections.IEnumerable GetData(ISearchExpression searchExpression, IList <ISearchOrder> searchOrders, object parentItem)
        {
            if (parentItem == null)
            {
                return(null);
            }

            SearchHistoryInfo his = this.ParentDisplayManager.SearchManager.GetHistory(0);

            if (!string.IsNullOrEmpty(his.Expression))
            {
                ISearchExpression exp = SearchExpression.Parse(his.Expression);
                exp = RemoveParentSelectAsExpression(exp);
                searchExpression = SearchExpression.And(searchExpression, exp);
            }

            foreach (string s in m_groupByColumns)
            {
                object            r = EntityScript.GetPropertyValue(parentItem, s);
                ISearchExpression se2;

                if (r != null && r != System.DBNull.Value)
                {
                    se2 = SearchExpression.Eq(s, EntityScript.GetPropertyValue(parentItem, s));
                }
                else
                {
                    se2 = SearchExpression.IsNull(s);
                }
                searchExpression = SearchExpression.And(searchExpression, se2);
            }

            this.SetHistory(searchExpression, searchOrders);

            return(m_innerSearchManager.GetData(searchExpression, searchOrders));
        }
Exemplo n.º 8
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string zid = id.Text.Trim().ToString();
            //string weiTuoRen = weiTuoRen.SelectedValue.ToString();
            string tiDanHao1       = tiDanHao.Text.Trim().ToString();
            string xiangLiang1     = xiangLiang.Text.Trim().ToString();
            string zongZhongLiang1 = zongZhongLiang.Text.Trim().ToString();
            string daiBiaoXing1    = daiBiaoXing.Text.Trim().ToString();
            string pinMing1        = pinMing.Text.Trim().ToString();
            string state1          = state.SelectedValue.ToString();
            string url             = "Search.aspx?window=网页查询_客户委托情况_进口&se=";

            Session.RemoveAll();
            ISearchExpression se = null;

            if (!string.IsNullOrEmpty(zid))
            {
                se            = AndIfNecessary(se, SearchExpression.Like("货代自编号", "%" + zid + "%"));
                Session["id"] = zid;
            }
            if (!string.IsNullOrEmpty(tiDanHao1))
            {
                se = AndIfNecessary(se, SearchExpression.Like("提单号", "%" + tiDanHao1 + "%"));
                Session["tiDanHao"] = tiDanHao1;
            }
            if (!string.IsNullOrEmpty(xiangLiang1))
            {
                se = AndIfNecessary(se, SearchExpression.Eq("箱量", xiangLiang1));
                Session["xiangLiang"] = xiangLiang1;
            }
            if (!string.IsNullOrEmpty(zongZhongLiang1))
            {
                se = AndIfNecessary(se, SearchExpression.Eq("总重量", zongZhongLiang1));
                Session["zongZhongLiang"] = zongZhongLiang1;
            }
            if (!string.IsNullOrEmpty(daiBiaoXing1))
            {
                se = AndIfNecessary(se, SearchExpression.Like("代表性箱号", "%" + daiBiaoXing1 + "%"));
                Session["daiBiaoXing"] = daiBiaoXing1;
            }
            if (!string.IsNullOrEmpty(pinMing1))
            {
                se = AndIfNecessary(se, SearchExpression.Like("品名", "%" + pinMing1 + "%"));
                Session["pinMing"] = pinMing1;
            }
            if (!string.IsNullOrEmpty(state1))
            {
                se = AndIfNecessary(se, SearchExpression.Eq("当前状态", state1));
                //Session["state"] = state1;
            }
            if (!weiTuoTime1.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Ge("委托时间", weiTuoTime1.Value.Trim().ToString()));
            }
            if (!weiTuoTime2.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Le("委托时间", weiTuoTime2.Value.Trim().ToString()));
            }
            if (!daoGangTime1.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Ge("到港时间", daoGangTime1.Value.Trim().ToString()));
            }
            if (!daoGangTime2.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Le("到港时间", daoGangTime2.Value.Trim().ToString()));
            }
            if (!danZhengTime1.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Ge("单证齐全时间", danZhengTime1.Value.Trim().ToString()));
            }
            if (!danZhengTime2.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Le("单证齐全时间", danZhengTime2.Value.Trim().ToString()));
            }
            if (!jieGuanTime1.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Ge("结关时间", jieGuanTime1.Value.Trim().ToString()));
            }
            if (!jieGuanTime2.Value.Trim().ToString().Equals(""))
            {
                se = AndIfNecessary(se, SearchExpression.Le("结关时间", jieGuanTime2.Value.Trim().ToString()));
            }

            if (se != null)
            {
                //exp = HttpUtility.UrlEncode(exp);
                string exp = se.ToString();
                //exp = HttpUtility.UrlEncode(exp, System.Text.Encoding.GetEncoding("gb2312"));
                exp  = Server.UrlEncode(exp);
                url += exp;
            }
            Response.Redirect(url);
        }
Exemplo n.º 9
0
        public static void FyDoubleClick(object sender1, EventArgs e1)
        {
            Xceed.Grid.DataCell cell = sender1 as Xceed.Grid.DataCell;
            Xceed.Grid.DataRow  row  = cell.ParentRow as Xceed.Grid.DataRow;

            //if (row.ParentGrid.ReadOnly)
            //    return;

            //IBoundGrid grid = (m_masterForm.ArchiveDetailForm as IArchiveDetailFormWithDetailGrids).DetailGrids[0];

            ArchiveSeeForm masterForm = cell.GridControl.FindForm() as ArchiveSeeForm;

            if (masterForm == null)
            {
                // 通过DetailForm来的
                masterForm = (cell.GridControl.FindForm() as ArchiveDetailForm).ParentForm as ArchiveSeeForm;
            }
            ArchiveOperationForm fydjForm = masterForm.Tag as ArchiveOperationForm;

            //if (cell.FieldName == "拟付金额" || cell.FieldName == "拟收金额" || cell.FieldName == "费用项")
            {
                if (fydjForm == null)
                {
                    if (masterForm.Name == "内贸出港_票费用")
                    {
                        fydjForm = ServiceProvider.GetService <IWindowFactory>().CreateWindow(ADInfoBll.Instance.GetWindowInfo("内贸出港_票费用项费用登记")) as ArchiveOperationForm;
                    }
                    else
                    {
                        fydjForm = ServiceProvider.GetService <IWindowFactory>().CreateWindow(ADInfoBll.Instance.GetWindowInfo("业务财务_票费用项费用登记")) as ArchiveOperationForm;
                    }

                    masterForm.Tag = fydjForm;

                    Dictionary <string, object> setDatanew = new Dictionary <string, object>();
                    fydjForm.Tag = setDatanew;

                    (fydjForm.ControlManager.Dao as 业务费用Dao).TransactionBeginning += new EventHandler <OperateArgs <业务费用> >(delegate(object sender, OperateArgs <业务费用> e)
                    {
                        if (e.Entity.费用实体 == null)
                        {
                            业务费用 fy  = e.Entity as 业务费用;
                            fy.费用实体  = e.Repository.Get <费用实体>(setDatanew["费用实体"]);
                            fy.票     = fy.费用实体 as 普通票;
                            fy.费用项编号 = (string)setDatanew["费用项"];
                        }
                    });
                    fydjForm.DisplayManager.SearchManager.EnablePage  = false;
                    fydjForm.DisplayManager.SearchManager.DataLoaded += new EventHandler <DataLoadedEventArgs>(delegate(object sender, DataLoadedEventArgs e)
                    {
                        fydjForm.TopMost = true;
                        fydjForm.Show();
                    });

                    fydjForm.FormClosing += new FormClosingEventHandler(delegate(object sender, FormClosingEventArgs e)
                    {
                        if (e.CloseReason == CloseReason.UserClosing)
                        {
                            if (!masterForm.IsDisposed)
                            {
                                if (masterForm is ArchiveOperationForm)
                                {
                                    //(masterForm as ArchiveOperationForm).ControlManager.DisplayManager.Items[(masterForm as ArchiveOperationForm).ControlManager.DisplayManager.Position] = (fydjForm.DisplayManager.CurrentItem as 费用).费用实体;
                                    (masterForm as ArchiveOperationForm).ControlManager.DisplayManager.SearchManager.ReloadItem((masterForm as ArchiveOperationForm).ControlManager.DisplayManager.Position);
                                    (masterForm as ArchiveOperationForm).ControlManager.OnCurrentItemChanged();
                                }
                                //IBoundGrid grid = (masterForm.ArchiveDetailForm as IArchiveDetailFormWithDetailGrids).DetailGrids[0];
                                //ISearchManager sm = grid.DisplayManager.SearchManager;
                                //System.Data.DataTable dt = (System.Data.DataTable)sm.FindData(new List<ISearchExpression> { }, null);
                                //foreach (System.Data.DataRow i in dt.Rows)
                                //{
                                //    if (i["费用项"].ToString() == setDatanew["费用项"].ToString())
                                //    {
                                //        object save = row.Cells["Submitted"].Value;
                                //        grid.SetDataRowsIListData(i, row);
                                //        row.Cells["Submitted"].Value = save;
                                //        break;
                                //    }
                                //}

                                e.Cancel = true;
                                fydjForm.Hide();
                            }
                        }
                    });
                }

                Dictionary <string, object> setData = fydjForm.Tag as Dictionary <string, object>;
                setData.Clear();

                //进口_额外费用_委托人   费用项双击事件
                if (masterForm.Text.Equals("进口_额外费用_委托人"))
                {
                    //明细窗体
                    if (cell.ParentColumn.Title.Equals("费用项"))
                    {
                        setData["费用实体"] = (Guid)row.Cells["费用实体"].Value;
                        setData["费用项"]  = (string)row.Cells["费用项"].Value;
                    }
                    //主窗体
                    else
                    {
                        using (var rep = ServiceProvider.GetService <IRepositoryFactory>().GenerateRepository <费用项>())
                        {
                            IList <费用项> list = (rep as Feng.NH.INHibernateRepository).List <费用项>(NHibernate.Criterion.DetachedCriteria.For <费用项>()
                                                                                                 .Add(NHibernate.Criterion.Expression.Eq("名称", cell.ParentColumn.Title)));
                            if (list != null && list.Count > 0)
                            {
                                setData["费用实体"] = (row.Tag as 进口票).ID;
                                setData["费用项"]  = list[0].编号;
                            }
                        }
                    }
                }
                // 票费用登记窗体
                else if (row.Cells["费用实体"] != null)
                {
                    setData["费用实体"] = (Guid)row.Cells["费用实体"].Value;
                    setData["费用项"]  = (string)row.Cells["费用项"].Value;
                    if (/*cell.FieldName == "已收金额" || cell.FieldName == "应收金额" || */ cell.FieldName == "拟收金额")
                    {
                        setData["收付标志"] = 收付标志.收;
                    }
                    else if (/*cell.FieldName == "已付金额" || cell.FieldName == "应付金额" || */ cell.FieldName == "拟付金额")
                    {
                        setData["收付标志"] = 收付标志.付;
                    }
                }
                // 滞箱费
                else
                {
                    setData["费用实体"] = (row.Tag as 费用信息).票Id;
                    setData["费用项"]  = "167";
                }

                NameValueMappingCollection.Instance["信息_箱号_动态"].Params["@票"] = (Guid)setData["费用实体"];
                NameValueMappingCollection.Instance.Reload(fydjForm.DisplayManager.Name, "信息_箱号_动态");

                ISearchExpression se = SearchExpression.And(SearchExpression.Eq("费用实体.ID", (Guid)setData["费用实体"]),
                                                            SearchExpression.Eq("费用项编号", (string)setData["费用项"]));
                if (setData.ContainsKey("收付标志"))
                {
                    se = SearchExpression.And(se, SearchExpression.Eq("收付标志", setData["收付标志"]));
                }
                fydjForm.ControlManager.DisplayManager.SearchManager.LoadData(se, null);
            }

            //Dictionary<string, bool?> submitted = new Dictionary<string, bool?>();
            //foreach (Xceed.Grid.DataRow i in grid.DataRows)
            //{
            //    submitted[i.Cells["费用项"].Value.ToString()] = (bool?)i.Cells["Submitted"].Value;
            //}
            //(row.GridControl as IBoundGrid).ReloadData();
            //foreach (Xceed.Grid.DataRow i in grid.DataRows)
            //{
            //    i.Cells["Submitted"].Value = submitted[i.Cells["费用项"].Value.ToString()];
            //}
        }
Exemplo n.º 10
0
        private void tsbAttachment_Click(object sender, EventArgs e)
        {
            if (this.AttachmentForm == null)
            {
                return;
            }

            object entity = this.DisplayManager.CurrentItem;

            if (entity == null)
            {
                MessageForm.ShowWarning("请选择当前行!");
                return;
            }

            Type entityType = entity.GetType();
            var  sm         = ServiceProvider.GetService <Feng.NH.ISessionFactoryManager>();

            if (sm == null)
            {
                return;
            }
            NHibernate.ISessionFactory sessionFactory = sm.GetSessionFactory(Feng.Utils.RepositoryHelper.GetConfigNameFromType(entityType));
            if (sessionFactory == null)
            {
                return;
            }

            bool hasCollection;

            int idx = m_attachmentEntityIdExp.LastIndexOf('.');

            if (idx != -1)
            {
                string navi = m_attachmentEntityIdExp.Substring(0, idx);
                entityType = Feng.NH.NHibernateHelper.GetPropertyType(sessionFactory, entityType, navi, out hasCollection);
            }

            NHibernate.Metadata.IClassMetadata metaData = sessionFactory.GetClassMetadata(entityType);
            string entityName = metaData.EntityName;
            object id         = EntityScript.GetPropertyValue(entity, m_attachmentEntityIdExp);
            string entityId;

            //object id = EntityHelper.GetPropertyValue(entity, metaData.IdentifierPropertyName);
            if (id != null)
            {
                entityId = id.ToString();
            }
            else
            {
                MessageForm.ShowWarning("当前行无Id!");
                return;
            }

            string formText = entityName + ":" + entityId;
            IArhiveOperationMasterForm form = this.AttachmentForm;
            var form2 = form as ArchiveSeeForm;

            form2.tsbSearch.Visible = false;
            form.Text = formText + " 的附件";
            form.Show();
            form.DoView();

            form.DisplayManager.SearchManager.LoadData(SearchExpression.And(
                                                           SearchExpression.Eq("EntityName", entityName), SearchExpression.Eq("EntityId", entityId)), null);

            m_attachmentEntityName = entityName;
            m_attachmentEntityId   = entityId;
            //(form.ControlManager.Dao as BaseDao<AttachmentInfo>).EntityOperating += new EventHandler<OperateArgs<AttachmentInfo>>(delegate(object sender1, OperateArgs<AttachmentInfo> e1)
            //{
            //    e1.Entity.EntityName = entityName;
            //    e1.Entity.EntityId = entityId;
            //});

            (form.ControlManager.Dao as BaseDao <AttachmentInfo>).EntityOperating -= new EventHandler <OperateArgs <AttachmentInfo> >(AttachmentForm_EntityOperating);
            (form.ControlManager.Dao as BaseDao <AttachmentInfo>).EntityOperating += new EventHandler <OperateArgs <AttachmentInfo> >(AttachmentForm_EntityOperating);
        }
Exemplo n.º 11
0
        /// <summary>
        /// 根据人员类型(委托人,承运人,收货人)和业务类型(进口,出口。。)生成查询条件
        /// 在"参数备案_人员单位"中有一列是Role,为此客户对应的数据库角色名。
        /// 例如,用户admin属于角色(货代角色1,收货人角色2),则990001(货代1)Role=货代角色1。当用admin登录后,可按照货代1查询
        /// </summary>
        /// <param name="人员类型"></param>
        /// <param name="业务类型"></param>
        /// <returns></returns>
        public static ISearchExpression GetConstraitByRole(人员类型 人员类型, 业务类型 业务类型)
        {
            if (System.Web.HttpContext.Current.User.Identity == null)
            {
                return(null);
            }

            string name = System.Web.HttpContext.Current.User.Identity.Name;

            //name = "100000";

            string[] roles;
            using (var pm = new Feng.UserManager.ProviderManager())
            {
                roles = pm.DefaultProvider.CreateUserManager().GetRoles(System.Web.Security.Membership.ApplicationName, name);
            }

            System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("SELECT * FROM 参数备案_人员单位 WHERE Role IN (");

            if (roles.Length == 0)
            {
                return(null);
            }

            for (int i = 0; i < roles.Length; ++i)
            {
                string paraNameI = "@Role" + i.ToString();
                cmd.CommandText += paraNameI;
                if (i != roles.Length - 1)
                {
                    cmd.CommandText += ",";
                }

                cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter(paraNameI, roles[i]));
            }
            cmd.CommandText += ')';

            System.Data.DataTable dt = Feng.Data.DbHelper.Instance.ExecuteDataTable(cmd);

            //for (int i = 0; i < roles.Length; ++i)
            //{
            //    string paraNameI = "'" + roles[i].ToString() + "'";
            //    cmd.CommandText += paraNameI;
            //    if (i != roles.Length - 1)
            //    {
            //        cmd.CommandText += ",";
            //    }
            //}
            //cmd.CommandText += ')';
            //System.Data.DataTable dt = DBManager.GetDateTable(cmd);

            Dictionary <人员类型, string> dict = new Dictionary <人员类型, string> {
                { 人员类型.委托人, "委托人" },
                { 人员类型.承运人, "承运人" }, { 人员类型.收货人, "收货人" }
            };

            ISearchExpression se = null;

            foreach (System.Data.DataRow row in dt.Rows)
            {
                if (!row["业务类型"].ToString().Contains(((int)业务类型).ToString("00") + ","))
                {
                    continue;
                }
                if (!row["角色用途"].ToString().Contains(((int)人员类型).ToString("00") + ","))
                {
                    continue;
                }

                ISearchExpression sse = null;// SearchExpression.Eq("ClientId", row["ClientId"].ToString());
                if (人员类型 != 人员类型.货代)
                {
                    sse = SearchExpression.Eq(dict[人员类型], row["编号"]); // SearchExpression.And(sse, SearchExpression.Eq(dict[人员类型], row["编号"]));
                }
                if (se == null)
                {
                    se = sse;
                }
                else
                {
                    if (sse != null)
                    {
                        se = SearchExpression.Or(se, sse);
                    }
                }
            }
            return(se);
        }
Exemplo n.º 12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="searchConditions"></param>
        /// <param name="searchOrders"></param>
        public virtual void FillSearchConditions(IList <ISearchExpression> searchConditions, IList <ISearchOrder> searchOrders)
        {
            if (Order.HasValue)
            {
                if (Order.Value)
                {
                    searchOrders.Add(SearchOrder.Asc(PropertyNameToSearch));
                }
                else
                {
                    searchOrders.Add(SearchOrder.Desc(PropertyNameToSearch));
                }
            }

            if (IsNull)
            {
                if (!IsNot)
                {
                    //// 对帐单.对账单号 为空,其实意义就是对帐单为空
                    //if (string.IsNullOrEmpty(this.Navigator))
                    //{
                    //    searchConditions.Add(SearchExpression.IsNull(PropertyNameToSearch));
                    //}
                    //else
                    //{
                    //    // 为空的话,只去最前面一个
                    //    string[] ss = this.Navigator.Split(new char[] { '.', ':' }, StringSplitOptions.RemoveEmptyEntries);
                    //    searchConditions.Add(SearchExpression.IsNull(ss[0]));
                    //}
                    if (SearchNullUseFull || string.IsNullOrEmpty(this.Navigator))
                    {
                        searchConditions.Add(SearchExpression.IsNull(PropertyNameToSearch));
                    }
                    else
                    {
                        if (string.IsNullOrEmpty(this.Navigator))
                        {
                            throw new ArgumentException("When SearchNullUseFull is false, it will use Navigator's first part, so navigator must not null!");
                        }
                        string[] ss = this.Navigator.Split(new char[] { '.', ':' }, StringSplitOptions.RemoveEmptyEntries);
                        searchConditions.Add(SearchExpression.IsNull(ss[0]));
                    }
                }
                else
                {
                    searchConditions.Add(SearchExpression.IsNotNull(PropertyNameToSearch));
                }
            }
            else
            {
                IMultiDataValueControl mdc = this.Control as IMultiDataValueControl;
                if (mdc != null)
                {
                    if (this.SelectedDataValues.Count == 0)
                    {
                        return;
                    }

                    if (!this.UseFuzzySearch.HasValue)
                    {
                        if (this.CanSelectFuzzySearch && mdc.SelectedDataValues.Count == 1)
                        {
                            if (!IsNot)
                            {
                                searchConditions.Add(SearchExpression.Like(PropertyNameToSearch, mdc.SelectedDataValues[0]));
                            }
                            else
                            {
                                searchConditions.Add(SearchExpression.NotLike(PropertyNameToSearch, mdc.SelectedDataValues[0]));
                            }
                        }
                        else
                        {
                            if (!IsNot)
                            {
                                searchConditions.Add(SearchExpression.InG(PropertyNameToSearch, mdc.SelectedDataValues));
                            }
                            else
                            {
                                searchConditions.Add(SearchExpression.NotInG(PropertyNameToSearch, mdc.SelectedDataValues));
                            }
                        }
                    }
                    else if (this.UseFuzzySearch.Value)
                    {
                        if (!IsNot)
                        {
                            searchConditions.Add(SearchExpression.GInG(PropertyNameToSearch, mdc.SelectedDataValues));
                        }
                        else
                        {
                            searchConditions.Add(SearchExpression.NotGInG(PropertyNameToSearch, mdc.SelectedDataValues));
                        }
                    }
                    else
                    {
                        if (!IsNot)
                        {
                            searchConditions.Add(SearchExpression.InG(PropertyNameToSearch, mdc.SelectedDataValues));
                        }
                        else
                        {
                            searchConditions.Add(SearchExpression.NotInG(PropertyNameToSearch, mdc.SelectedDataValues));
                        }
                    }
                }
                else
                {
                    if (this.SelectedDataValue == null)
                    {
                        return;
                    }

                    if (this.CanSelectFuzzySearch && (!this.UseFuzzySearch.HasValue || this.UseFuzzySearch.Value))
                    {
                        string s = this.SelectedDataValue.ToString();
                        if (!IsNot)
                        {
                            searchConditions.Add(SearchExpression.Like(PropertyNameToSearch, s));
                        }
                        else
                        {
                            searchConditions.Add(SearchExpression.NotLike(PropertyNameToSearch, s));
                        }
                    }
                    else
                    {
                        if (!IsNot)
                        {
                            searchConditions.Add(SearchExpression.Eq(PropertyNameToSearch, this.SelectedDataValue));
                        }
                        else
                        {
                            searchConditions.Add(SearchExpression.NotEq(PropertyNameToSearch, this.SelectedDataValue));
                        }
                    }
                }
            }

            if (!string.IsNullOrEmpty(this.AdditionalSearchExpression))
            {
                searchConditions.Add(SearchExpression.Parse(this.AdditionalSearchExpression));
            }
        }
Exemplo n.º 13
0
        public static void FyDoubleClick(object sender1, EventArgs e1)
        {
            Xceed.Grid.DataCell cell = sender1 as Xceed.Grid.DataCell;
            Xceed.Grid.DataRow  row  = cell.ParentRow as Xceed.Grid.DataRow;

            ArchiveSeeForm masterForm = cell.GridControl.FindForm() as ArchiveSeeForm;

            if (masterForm == null)
            {
                // 通过DetailForm来的
                masterForm = (cell.GridControl.FindForm() as ArchiveDetailForm).ParentForm as ArchiveSeeForm;
            }
            ArchiveOperationForm fydjForm = masterForm.Tag as ArchiveOperationForm;

            //if (cell.FieldName == "拟付金额" || cell.FieldName == "拟收金额" || cell.FieldName == "费用项")
            {
                if (fydjForm == null)
                {
                    fydjForm       = ServiceProvider.GetService <IWindowFactory>().CreateWindow(ADInfoBll.Instance.GetWindowInfo("业务备案_车辆产值费用_双击")) as ArchiveOperationForm;
                    masterForm.Tag = fydjForm;

                    Dictionary <string, object> setDatanew = new Dictionary <string, object>();
                    fydjForm.Tag = setDatanew;

                    (fydjForm.ControlManager.Dao as 业务费用Dao).TransactionBeginning += new EventHandler <OperateArgs <费用> >(delegate(object sender, OperateArgs <费用> e)
                    {
                        if (e.Entity.费用实体 == null)
                        {
                            业务费用 fy  = e.Entity as 业务费用;
                            fy.费用实体  = e.Repository.Get <费用实体>(setDatanew["费用实体"]);
                            fy.费用项编号 = (string)setDatanew["费用项"];
                            fy.车辆产值  = fy.费用实体 as 车辆产值;
                        }
                    });
                    fydjForm.DisplayManager.SearchManager.EnablePage  = false;
                    fydjForm.DisplayManager.SearchManager.DataLoaded += new EventHandler <DataLoadedEventArgs>(delegate(object sender, DataLoadedEventArgs e)
                    {
                        fydjForm.TopMost = true;
                        fydjForm.Show();
                    });

                    fydjForm.FormClosing += new FormClosingEventHandler(delegate(object sender, FormClosingEventArgs e)
                    {
                        if (e.CloseReason == CloseReason.UserClosing)
                        {
                            if (!masterForm.IsDisposed)
                            {
                                if (masterForm is ArchiveOperationForm)
                                {
                                    (masterForm as ArchiveOperationForm).ControlManager.DisplayManager.SearchManager.ReloadItem((masterForm as ArchiveOperationForm).ControlManager.DisplayManager.Position);
                                    (masterForm as ArchiveOperationForm).ControlManager.OnCurrentItemChanged();
                                }

                                e.Cancel = true;
                                fydjForm.Hide();
                            }
                            else
                            {
                            }
                        }
                    });
                }

                Dictionary <string, object> setData = fydjForm.Tag as Dictionary <string, object>;
                setData.Clear();

                // 票费用登记窗体
                if (row.Cells["费用实体"] != null)
                {
                    setData["费用实体"] = (Guid)row.Cells["费用实体"].Value;
                    setData["费用项"]  = (string)row.Cells["费用项"].Value;
                    if (/*cell.FieldName == "已收金额" || cell.FieldName == "应收金额" || */ cell.FieldName == "拟收金额")
                    {
                        setData["收付标志"] = 收付标志.收;
                    }
                    else if (/*cell.FieldName == "已付金额" || cell.FieldName == "应付金额" || */ cell.FieldName == "拟付金额")
                    {
                        setData["收付标志"] = 收付标志.付;
                    }
                }
                else
                {
                    throw new ArgumentException("There must be a column named 费用实体!");
                }
                //NameValueMappingCollection.Instance["信息_箱号_动态"].Params["@票"] = (Guid)setData["费用实体"];
                //NameValueMappingCollection.Instance.Reload("信息_箱号_动态");

                //Feng.Windows.Forms.MyObjectPicker op = (fydjForm.MasterGrid.GetInsertionRow().Cells["任务"].CellEditorManager as Feng.Grid.Editors.MyObjectPickerEditor).TemplateControl;
                //string exp = "车辆产值.ID = " + ((Guid)setData["费用实体"]).ToString();
                //op.SearchExpressionParam = exp;

                Feng.Windows.Forms.MyObjectPicker op = (fydjForm.MasterGrid.Columns["任务"].CellEditorManager as Feng.Grid.Editors.MyObjectPickerEditor).TemplateControl;
                string exp = "车辆产值.ID = " + ((Guid)setData["费用实体"]).ToString();
                op.SearchExpressionParam = exp;

                ISearchExpression se = SearchExpression.And(SearchExpression.Eq("费用实体.ID", (Guid)setData["费用实体"]),
                                                            SearchExpression.Eq("费用项编号", (string)setData["费用项"]));

                if (setData.ContainsKey("收付标志"))
                {
                    se = SearchExpression.And(se, SearchExpression.Eq("收付标志", setData["收付标志"]));
                }
                fydjForm.ControlManager.DisplayManager.SearchManager.LoadData(se, new List <ISearchOrder>());
            }
        }
Exemplo n.º 14
0
        private void 承运时间要求详情_Load(object sender, EventArgs e)
        {
            using (IRepository rep = ServiceProvider.GetService <IRepositoryFactory>().GenerateRepository <车辆作业>())
            {
                var clzy = rep.Get <车辆作业>(m_clzy.ID);

                m_dm.SetDataBinding(new List <车辆作业> {
                    clzy
                }, string.Empty);

                var dm = m_dm;
                // dm.DataControls["箱型编号"].SelectedDataValue = clzy.专家任务.任务[0].箱型编号;

                var list = m_任务集合区.DisplayManager.SearchManager.GetData(SearchExpression.Eq("专家任务:车辆作业", clzy),
                                                                        new List <ISearchOrder> {
                    SearchOrder.Asc("任务性质")
                });

                int idx = 0;
                List <Xceed.Grid.DataRow> realTimeRows = new List <Xceed.Grid.DataRow>();
                Xceed.Grid.DataRow        row;
                foreach (var i in list)
                {
                    if (idx != 0)
                    {
                        m_任务集合区.AddSpaceDataRow();
                    }

                    row = m_任务集合区.DataRows.AddNew();
                    m_任务集合区.SetDataRowsIListData(i, row);
                    row.EndEdit();
                    row.Cells["序号"].Value = idx + 1;

                    foreach (Xceed.Grid.Cell cell in row.Cells)
                    {
                        单个作业监控详情.SetCellValueNone(cell);
                    }

                    row = m_任务集合区.DataRows.AddNew();
                    row.EndEdit();
                    realTimeRows.Add(row);
                    row.ForeColor = System.Drawing.Color.Red;

                    单个作业监控详情.SetCellValueNone(row.Cells["疏港期限"]);
                    单个作业监控详情.SetCellValueNone(row.Cells["还箱进港时间"]);

                    idx++;
                }

                FillRowsRealTimes(clzy, realTimeRows);

                switch (clzy.专家任务.任务性质)
                {
                case 专家任务性质.静态优化套箱:
                case 专家任务性质.动态优化套箱:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["装货时间"]);
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["还箱进港时间"]);

                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["疏港期限"]);
                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["卸货时间"]);
                    break;

                case 专家任务性质.静态优化进口箱带货:
                case 专家任务性质.动态优化进口箱带货:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["装货时间"]);

                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["提箱时间"]);
                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["还箱进港时间"]);
                    break;

                case 专家任务性质.静态优化出口箱带货:
                case 专家任务性质.动态优化出口箱带货:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["卸货时间"]);

                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["疏港期限"]);
                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["还箱进港时间"]);
                    break;

                case 专家任务性质.静态优化进口箱对箱:
                case 专家任务性质.动态优化进口箱对箱:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["装货时间"]);

                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["装货时间"]);
                    break;

                case 专家任务性质.静态优化出口箱对箱:
                case 专家任务性质.动态优化出口箱对箱:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["卸货时间"]);

                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["卸货时间"]);
                    break;

                case 专家任务性质.静态优化进出口对箱:
                case 专家任务性质.动态优化进出口对箱:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["装货时间"]);

                    单个作业监控详情.SetCellValueNone(realTimeRows[1].Cells["卸货时间"]);
                    break;

                case 专家任务性质.无优化进口拆箱:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["装货时间"]);
                    break;

                case 专家任务性质.无优化出口装箱:
                    单个作业监控详情.SetCellValueNone(realTimeRows[0].Cells["卸货时间"]);
                    break;

                case 专家任务性质.无优化I带货:
                    break;

                case 专家任务性质.无优化E带货:
                    break;
                }
            }
        }
Exemplo n.º 15
0
        private ISearchExpression ParseSimpleExpression()
        {
            string            s1 = ParseWordExpression();
            string            s2;
            ISearchExpression exp;

            switch (this.token)
            {
            case TokenType.Eq:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.Eq(s1, s2));

            case TokenType.NotEq:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.NotEq(s1, s2));

            case TokenType.EqProperty:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.EqProperty(s1, s2));

            case TokenType.Gt:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.Gt(s1, s2));

            case TokenType.Ge:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.Ge(s1, s2));

            case TokenType.Lt:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.Lt(s1, s2));

            case TokenType.Le:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.Le(s1, s2));

            case TokenType.InG:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.InG(s1, GetArrayList(s2)));

            case TokenType.GInG:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.GInG(s1, GetArrayList(s2)));

            case TokenType.Like:
                this.MoveNext();
                s2 = ParseWordExpression();
                return(SearchExpression.Like(s1, s2));

            case TokenType.IsNull:
                exp = SearchExpression.IsNull(s1);
                this.MoveNext();
                return(exp);

            case TokenType.IsNotNull:
                exp = SearchExpression.IsNotNull(s1);
                this.MoveNext();
                return(exp);

            case TokenType.Sql:
                exp = SearchExpression.Sql(s1);
                this.MoveNext();
                return(exp);

            default:
                throw new ArgumentException("Invalid token of " + token);
            }
        }
Exemplo n.º 16
0
        private void 单个作业监控详情_Load(object sender, EventArgs e)
        {
            using (IRepository rep = ServiceProvider.GetService <IRepositoryFactory>().GenerateRepository <车辆作业>())
            {
                var clzy = rep.Get <车辆作业>(m_clzy.ID);

                m_dm.SetDataBinding(new List <车辆作业> {
                    clzy
                }, string.Empty);

                m_任务集合1.DisplayManager.SearchManager.LoadData(SearchExpression.Eq("专家任务:车辆作业", clzy),
                                                              new List <ISearchOrder> {
                    SearchOrder.Asc("任务性质")
                });
                m_任务集合1.DisplayManager.SearchManager.WaitLoadData();
                m_任务集合2.DisplayManager.SearchManager.LoadData(SearchExpression.Eq("专家任务:车辆作业", clzy),
                                                              new List <ISearchOrder> {
                    SearchOrder.Asc("任务性质")
                });
                m_任务集合2.DisplayManager.SearchManager.WaitLoadData();

                List <Xceed.Grid.DataRow> realTimeRows = new List <Xceed.Grid.DataRow>();
                foreach (Xceed.Grid.DataRow i in m_任务集合2.DataRows)
                {
                    realTimeRows.Add(i);
                }
                int currentRowIdx = 承运时间要求详情.FillRowsRealTimes(clzy, realTimeRows);

                if (clzy.最新作业状态 != null)
                {
                    Xceed.Grid.DataRow row = m_任务集合2.DataRows[currentRowIdx];
                    row.Cells["车辆位置"].Value   = clzy.最新作业状态.车辆位置;
                    row.Cells["作业状态"].Value   = clzy.最新作业状态.作业状态;
                    row.Cells["预计到达时间"].Value = clzy.最新作业状态.预计到达时间;
                    row.Cells["异常情况"].Value   = clzy.最新作业状态.异常情况;
                }

                switch (clzy.专家任务.任务性质)
                {
                case 专家任务性质.静态优化套箱:
                case 专家任务性质.动态优化套箱:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["装货时间"]);
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["还箱进港时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系电话"]);

                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["提箱时间"]);
                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["卸货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货联系电话"]);
                    break;

                case 专家任务性质.静态优化进口箱带货:
                case 专家任务性质.动态优化进口箱带货:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["装货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系电话"]);

                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["提箱时间"]);
                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["还箱进港时间"]);
                    break;

                case 专家任务性质.静态优化出口箱带货:
                case 专家任务性质.动态优化出口箱带货:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["卸货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货联系电话"]);

                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["提箱时间"]);
                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["还箱进港时间"]);
                    break;

                case 专家任务性质.静态优化进口箱对箱:
                case 专家任务性质.动态优化进口箱对箱:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["装货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系电话"]);

                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["装货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["装货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["装货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["装货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["装货联系电话"]);
                    break;

                case 专家任务性质.静态优化出口箱对箱:
                case 专家任务性质.动态优化出口箱对箱:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["卸货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货联系电话"]);

                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["卸货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货联系电话"]);
                    break;

                case 专家任务性质.静态优化进出口对箱:
                case 专家任务性质.动态优化进出口对箱:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["装货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系电话"]);

                    SetCellValueNone(m_任务集合2.DataRows[1].Cells["卸货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[1].Cells["卸货联系电话"]);
                    break;

                case 专家任务性质.无优化进口拆箱:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["装货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["装货联系电话"]);
                    break;

                case 专家任务性质.无优化出口装箱:
                    SetCellValueNone(m_任务集合2.DataRows[0].Cells["卸货时间"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货地详细地址"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货时间要求"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货联系人"]);
                    SetCellValueNone(m_任务集合1.DataRows[0].Cells["卸货联系电话"]);
                    break;

                case 专家任务性质.无优化I带货:
                    break;

                case 专家任务性质.无优化E带货:
                    break;
                }
            }
        }