예제 #1
0
        /// <summary>
        /// 刷新数据
        /// </summary>
        void RefrshData()
        {
            m_dtSource = m_serverCannibalize.GetBillInfo();

            if (BasicInfo.DeptCode.Length >= 4)
            {
                Service_Manufacture_WorkShop.IWorkShopBasic serverBasic =
                    Service_Manufacture_WorkShop.ServerModuleFactory.GetServerModule <Service_Manufacture_WorkShop.IWorkShopBasic>();
                WS_WorkShopCode tempLnq = serverBasic.GetWorkShopCodeInfo(BasicInfo.DeptCode.Substring(0, 4));

                if (tempLnq != null)
                {
                    m_dtSource = GlobalObject.DataSetHelper.SiftDataTable(m_dtSource,
                                                                          "调入车间编码 = '" + tempLnq.WSCode + "' or 调出车间编码 = '" + tempLnq.WSCode + "'", out m_strError);
                }
            }

            DataColumnCollection columns = m_dtSource.Columns;

            if (columns.Count > 0)
            {
                for (int i = 0; i < columns.Count; i++)
                {
                    m_lstFindField.Add(columns[i].ColumnName);
                }
            }

            dataGridView1.DataSource = m_dtSource;

            userControlDataLocalizer1.Init(this.dataGridView1, this.Name,
                                           UniversalFunction.SelectHideFields(this.Name, this.dataGridView1.Name, BasicInfo.LoginID));
        }