Пример #1
0
        /// <summary>
        /// Get data from database and assign to datasource of LookUp
        /// </summary>
        private void FillData()
        {
            System.Data.DataTable        dtResult = new System.Data.DataTable();
            System.Collections.Hashtable htCond   = new System.Collections.Hashtable();
            htCond.Add(CommonData.CommonCode, Code);
            CommonBl commonBl = new CommonBl();

            commonBl.SelectCommonData(htCond, out dtResult);

            if (dtResult.Columns.Count > 0)
            {
                if (HasNull)
                {
                    DataRow newRow = dtResult.NewRow();
                    //newRow[0] = CommonData.StringEmpty;
                    dtResult.Rows.InsertAt(newRow, 0);
                }
            }

            this.Properties.DataSource = dtResult;
            this.Properties.Columns.Clear();
            IvsLookUpColumnInfo lookupColumn = new IvsLookUpColumnInfo(CommonData.CommonValue);

            this.Properties.Columns.Add(lookupColumn);
            this.Properties.Columns[CommonData.CommonValue].Caption = CommonData.StringEmpty;
            this.Properties.DisplayMember = CommonData.CommonValue;
            this.Properties.ValueMember   = CommonData.CommonKey;
            this.EditValue           = CommonData.StringEmpty;
            this.Properties.NullText = CommonData.StringEmpty;
        }
Пример #2
0
        protected override void SetLanguage()
        {
            this.Properties.Columns.Clear();

            if (UserSession.LangId == null)
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonData.CommonCode);
                columnCode.Width = 100;
                IvsLookUpColumnInfo columnName2 = new IvsLookUpColumnInfo(CommonKey.Name2);
                columnName2.Width = 300;
                this.Properties.Columns.Add(columnCode);
                this.Properties.Columns.Add(columnName2);
                this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                this.Properties.Columns[CommonKey.Name2].Caption       = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.Name2;
                this.Properties.ValueMember   = CommonData.CommonCode;
            }
            else
            {
                if (UserSession.LangId.Equals((CommonData.Language.VietNamese)))
                {
                    IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonData.CommonCode);
                    columnCode.Width = 100;
                    IvsLookUpColumnInfo columnName1 = new IvsLookUpColumnInfo(CommonKey.Name1);
                    columnName1.Width = 300;
                    this.Properties.Columns.Add(columnCode);
                    this.Properties.Columns.Add(columnName1);
                    this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                    this.Properties.Columns[CommonKey.Name1].Caption       = CommonData.StringEmpty;
                    this.Properties.DisplayMember = CommonKey.Name1;
                    this.Properties.ValueMember   = CommonData.CommonCode;
                }
                else if (UserSession.LangId.Equals((CommonData.Language.English)))
                {
                    IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonData.CommonCode);
                    columnCode.Width = 100;
                    IvsLookUpColumnInfo columnName2 = new IvsLookUpColumnInfo(CommonKey.Name2);
                    columnName2.Width = 300;
                    this.Properties.Columns.Add(columnCode);
                    this.Properties.Columns.Add(columnName2);
                    this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                    this.Properties.Columns[CommonKey.Name2].Caption       = CommonData.StringEmpty;
                    this.Properties.DisplayMember = CommonKey.Name2;
                    this.Properties.ValueMember   = CommonData.CommonCode;
                }
                else if (UserSession.LangId.Equals((CommonData.Language.Japanese)))
                {
                    IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonData.CommonCode);
                    columnCode.Width = 100;
                    IvsLookUpColumnInfo columnName3 = new IvsLookUpColumnInfo(CommonKey.Name3);
                    columnName3.Width = 300;
                    this.Properties.Columns.Add(columnCode);
                    this.Properties.Columns.Add(columnName3);
                    this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                    this.Properties.Columns[CommonKey.Name3].Caption       = CommonData.StringEmpty;
                    this.Properties.DisplayMember = CommonKey.Name3;
                    this.Properties.ValueMember   = CommonData.CommonCode;
                }
            }
        }
Пример #3
0
        /// <summary>
        /// Get data from database and assign to datasource of LookUp
        /// </summary>
        protected override void FillData()
        {
            System.Data.DataTable        dtResult = new System.Data.DataTable();
            System.Collections.Hashtable htCond   = new System.Collections.Hashtable();
            htCond.Add(CommonData.CommonCode, Code);
            CommonBl commonBl = new CommonBl();

            commonBl.SelectCommonData(htCond, out dtResult);

            if (dtResult.Columns.Count > 0)
            {
                if (HasNull)
                {
                    dtResult.Rows.InsertAt(dtResult.NewRow(), 0);
                }
            }

            this.DataSource = dtResult;
            this.Columns.Clear();
            IvsLookUpColumnInfo lookupColumn = new IvsLookUpColumnInfo(CommonData.CommonValue);

            this.Columns.Add(lookupColumn);
            this.Columns[CommonData.CommonValue].Caption = CommonData.StringEmpty;
            this.DisplayMember = CommonData.CommonValue;
            this.ValueMember   = CommonData.CommonKey;
            this.NullText      = CommonData.StringEmpty;
            if (this.DropDownRows > dtResult.Rows.Count)
            {
                this.DropDownRows = dtResult.Rows.Count + 1;
            }
        }
Пример #4
0
        protected override void SetLanguage()
        {
            this.Columns.Clear();

            IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Code);
            IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name);

            this.Columns.Add(columnCode);
            this.Columns.Add(columnName);
            this.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
            this.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
            this.DisplayMember = this.DisplayValue;
            this.ValueMember   = CommonKey.Code;
        }
Пример #5
0
        /// <summary>
        /// Change content in control follow to current language
        /// </summary>
        protected virtual void SetLanguage()
        {
            this.Columns.Clear();

            //if (this.Code.Equals(CommonData.FunctionId.Msro00))
            // {
            //     IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonData.CommonCode);
            //     this.Properties.Columns.Add(columnCode);
            //     this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
            //     this.Properties.DisplayMember = CommonData.CommonCode;
            //     this.Properties.ValueMember = CommonData.CommonCode;
            // }
            // else if (this.Code.Equals(CommonData.FunctionId.Mssp00))
            // {
            //     IvsLookUpColumnInfo columnPeriod = new IvsLookUpColumnInfo(CommonKey.Period);
            //     this.Properties.Columns.Add(columnPeriod);
            //     this.Properties.Columns[CommonKey.Period].Caption = CommonData.StringEmpty;
            //     this.Properties.DisplayMember = CommonKey.Period;
            //     this.Properties.ValueMember = CommonKey.Period;
            // }

            // else if (this.Code.Equals(CommonData.FunctionId.Mswa00))
            // {
            //     IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonData.CommonCode);
            //     IvsLookUpColumnInfo columnRemark = new IvsLookUpColumnInfo("Remark");
            //     this.Properties.Columns.Add(columnCode);
            //     this.Properties.Columns.Add(columnRemark);
            //     this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
            //     this.Properties.Columns["Remark"].Caption = CommonData.StringEmpty;
            //     this.Properties.DisplayMember = "";
            //     this.Properties.ValueMember = CommonKey.Code;
            // }

            // else if (this.Code.Equals(CommonData.FunctionId.Hrem00))
            // {
            //     IvsLookUpColumnInfo columnEmployeeId = new IvsLookUpColumnInfo(CommonKey.EmployeeId);
            //     IvsLookUpColumnInfo columnEmployeeName = new IvsLookUpColumnInfo(CommonKey.EmployeeName);
            //     this.Properties.Columns.Add(columnEmployeeId);
            //     this.Properties.Columns.Add(columnEmployeeName);
            //     this.Properties.Columns[CommonKey.EmployeeId].Caption = CommonData.StringEmpty;
            //     this.Properties.Columns[CommonKey.EmployeeName].Caption = CommonData.StringEmpty;
            //     this.Properties.DisplayMember = "DisplayName";//CommonKey.EmployeeName;
            //     this.Properties.ValueMember = CommonKey.EmployeeId;
            // }

            //Start Le Hong Chau on 20130822
            //else if (this.Code.Equals(CommonData.FunctionId.Hrwe00))
            //{
            //    IvsLookUpColumnInfo columnEmployeeId = new IvsLookUpColumnInfo(CommonKey.EmployeeId);
            //    IvsLookUpColumnInfo columnEmployeeName = new IvsLookUpColumnInfo(CommonKey.EmployeeName);
            //    this.Properties.Columns.Add(columnEmployeeId);
            //    this.Properties.Columns.Add(columnEmployeeName);
            //    this.Properties.Columns[CommonKey.EmployeeId].Caption = CommonData.StringEmpty;
            //    this.Properties.Columns[CommonKey.EmployeeName].Caption = CommonData.StringEmpty;
            //    this.Properties.DisplayMember = "DisplayName";//CommonKey.EmployeeName;
            //    this.Properties.ValueMember = CommonKey.EmployeeId;
            //}
            //End Le Hong Chau on 20130822
            if (this.Code.Equals(CommonData.FunctionGr.MS_Units))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Columns.Add(columnCode);
                this.Columns.Add(columnName);
                this.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.Code;
                this.ValueMember   = CommonKey.Code;
            }
            else
            if (this.Code.Equals(CommonData.FunctionGr.PR_SampleShippingText))
            {
                IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.SampleShippingText);
                this.Columns.Add(columnName);
                this.Columns[CommonKey.SampleShippingText].Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.SampleShippingText;
                this.ValueMember   = CommonKey.SampleShippingText;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Employee))
            {
                IvsLookUpColumnInfo columnEmployeeId   = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnEmployeeName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Columns.Add(columnEmployeeId);
                this.Columns.Add(columnEmployeeName);
                this.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.DisplayName;
                this.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Customers))
            {
                IvsLookUpColumnInfo columnCustomersCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnCustomersName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Columns.Add(columnCustomersCode);
                this.Columns.Add(columnCustomersName);
                this.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.Name;
                this.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Suppliers))
            {
                IvsLookUpColumnInfo columnSuppliersCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnSuppliersName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Columns.Add(columnSuppliersCode);
                this.Columns.Add(columnSuppliersName);
                this.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.Name;
                this.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Items))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name);
                IvsLookUpColumnInfo columnUnit = new IvsLookUpColumnInfo(CommonKey.InvUnitCode);
                this.Columns.Add(columnCode);
                this.Columns.Add(columnName);
                this.Columns.Add(columnUnit);
                this.Columns[CommonKey.Code].Caption        = CommonData.StringEmpty;
                this.Columns[CommonKey.Name].Caption        = CommonData.StringEmpty;
                this.Columns[CommonKey.InvUnitCode].Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.Code;
                this.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Items_DisplayName))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name);
                IvsLookUpColumnInfo columnUnit = new IvsLookUpColumnInfo(CommonKey.InvUnitCode);
                this.Columns.Add(columnCode);
                this.Columns.Add(columnName);
                this.Columns.Add(columnUnit);
                this.Columns[CommonKey.Code].Caption        = CommonData.StringEmpty;
                this.Columns[CommonKey.Name].Caption        = CommonData.StringEmpty;
                this.Columns[CommonKey.InvUnitCode].Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.Name;
                this.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.SY_Functions))
            {
                if (UserSession.LangId != null)
                {
                    if (UserSession.LangId.Equals((CommonData.Language.VietNamese)))
                    {
                        IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                        IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name1);
                        this.Columns.Add(columnCode);
                        this.Columns.Add(columnName);
                        this.Columns[CommonKey.FunctionId].Caption = CommonData.StringEmpty;
                        this.Columns[CommonKey.Name1].Caption      = CommonData.StringEmpty;
                        this.DisplayMember = CommonKey.Name1;
                        this.ValueMember   = CommonKey.FunctionId;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.English)))
                    {
                        IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                        IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name2);
                        this.Columns.Add(columnCode);
                        this.Columns.Add(columnName);
                        this.Columns[CommonKey.FunctionId].Caption = CommonData.StringEmpty;
                        this.Columns[CommonKey.Name2].Caption      = CommonData.StringEmpty;
                        this.DisplayMember = CommonKey.Name2;
                        this.ValueMember   = CommonKey.FunctionId;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.Japanese)))
                    {
                        IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                        IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name3);
                        this.Columns.Add(columnCode);
                        this.Columns.Add(columnName);
                        this.Columns[CommonKey.FunctionId].Caption = CommonData.StringEmpty;
                        this.Columns[CommonKey.Name3].Caption      = CommonData.StringEmpty;
                        this.DisplayMember = CommonKey.Name3;
                        this.ValueMember   = CommonKey.FunctionId;
                    }
                }
                else
                {
                    IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                    IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name2);
                    this.Columns.Add(columnCode);
                    this.Columns.Add(columnName);
                    this.Columns[CommonKey.FunctionId].Caption = CommonData.StringEmpty;
                    this.Columns[CommonKey.Name2].Caption      = CommonData.StringEmpty;
                    this.DisplayMember = CommonKey.Name2;
                    this.ValueMember   = CommonKey.FunctionId;
                }
            }
            else if (this.Code.Equals(CommonData.FunctionGr.ST_StockTransactionMaster))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.DocumentNumber);
                this.Columns.Add(columnCode);
                columnCode.Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.DocumentNumber;
                this.ValueMember   = CommonKey.DocumentNumber;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.ProcessType))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Columns.Add(columnCode);
                columnCode.Caption = CommonData.StringEmpty;
                this.DisplayMember = CommonKey.Name;
                this.ValueMember   = CommonKey.Code;
            }
            else
            {
                if (UserSession.LangId == null)
                {
                    IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                    IvsLookUpColumnInfo columnName2 = new IvsLookUpColumnInfo(CommonKey.Name2);
                    this.Columns.Add(columnCode);
                    this.Columns.Add(columnName2);
                    this.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                    this.Columns[CommonKey.Name2].Caption       = CommonData.StringEmpty;
                    this.DisplayMember = CommonKey.Name2;
                    this.ValueMember   = CommonData.CommonCode;
                }
                else
                {
                    if (UserSession.LangId.Equals((CommonData.Language.VietNamese)))
                    {
                        IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                        IvsLookUpColumnInfo columnName1 = new IvsLookUpColumnInfo(CommonKey.Name1);
                        this.Columns.Add(columnCode);
                        this.Columns.Add(columnName1);
                        this.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                        this.Columns[CommonKey.Name1].Caption       = CommonData.StringEmpty;
                        this.DisplayMember = CommonKey.Name1;
                        this.ValueMember   = CommonData.CommonCode;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.English)))
                    {
                        IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                        IvsLookUpColumnInfo columnName2 = new IvsLookUpColumnInfo(CommonKey.Name2);
                        this.Columns.Add(columnCode);
                        this.Columns.Add(columnName2);
                        this.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                        this.Columns[CommonKey.Name2].Caption       = CommonData.StringEmpty;
                        this.DisplayMember = CommonKey.Name2;
                        this.ValueMember   = CommonData.CommonCode;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.Japanese)))
                    {
                        IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                        IvsLookUpColumnInfo columnName3 = new IvsLookUpColumnInfo(CommonKey.Name3);
                        this.Columns.Add(columnCode);
                        this.Columns.Add(columnName3);
                        this.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                        this.Columns[CommonKey.Name3].Caption       = CommonData.StringEmpty;
                        this.DisplayMember = CommonKey.Name3;
                        this.ValueMember   = CommonData.CommonCode;
                    }
                }
            }
        }
Пример #6
0
        /// <summary>
        /// Change content in control follow to current language
        /// </summary>
        protected virtual void SetLanguage()
        {
            this.Properties.Columns.Clear();

            if (this.Code.Equals(CommonData.FunctionGr.MS_Units))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Properties.Columns.Add(columnCode);
                this.Properties.Columns.Add(columnName);
                this.Properties.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.Code;
                this.Properties.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Currency))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Properties.Columns.Add(columnCode);
                this.Properties.Columns.Add(columnName);
                this.Properties.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.Name;
                this.Properties.ValueMember   = CommonData.CommonCode;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Employee))
            {
                IvsLookUpColumnInfo columnEmployeeId   = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnEmployeeName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Properties.Columns.Add(columnEmployeeId);
                this.Properties.Columns.Add(columnEmployeeName);
                this.Properties.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.DisplayName;
                this.Properties.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Customers))
            {
                IvsLookUpColumnInfo columnCustomersCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnCustomersName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Properties.Columns.Add(columnCustomersCode);
                this.Properties.Columns.Add(columnCustomersName);
                this.Properties.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.Name;
                this.Properties.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.MS_Suppliers))
            {
                IvsLookUpColumnInfo columnSuppliersCode = new IvsLookUpColumnInfo(CommonKey.Code);
                IvsLookUpColumnInfo columnSuppliersName = new IvsLookUpColumnInfo(CommonKey.Name);
                this.Properties.Columns.Add(columnSuppliersCode);
                this.Properties.Columns.Add(columnSuppliersName);
                this.Properties.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
                this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.Name;
                this.Properties.ValueMember   = CommonKey.Code;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.ST_StockOverview) ||
                     this.Code.Equals(CommonData.FunctionGr.ST_StockTransactionMaster))
            {
                IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.DocumentNumber);
                //IvsLookUpColumnInfo columnPeriodName = new IvsLookUpColumnInfo(CommonKey.Period);
                this.Properties.Columns.Add(columnCode);
                //this.Properties.Columns.Add(columnPeriodName);
                this.Properties.Columns[CommonKey.DocumentNumber].Caption = CommonData.StringEmpty;
                //this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.DocumentNumber;
                this.Properties.ValueMember   = CommonKey.DocumentNumber;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.ST_MonthlyProcess))
            {
                IvsLookUpColumnInfo columnPeriodCode = new IvsLookUpColumnInfo(CommonKey.Period);
                //IvsLookUpColumnInfo columnPeriodName = new IvsLookUpColumnInfo(CommonKey.Period);
                this.Properties.Columns.Add(columnPeriodCode);
                //this.Properties.Columns.Add(columnPeriodName);
                this.Properties.Columns[CommonKey.Period].Caption = CommonData.StringEmpty;
                //this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.Period;
                this.Properties.ValueMember   = CommonKey.Period;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.ST_MonthlyProcess_PeriodClose))
            {
                IvsLookUpColumnInfo columnPeriodCode = new IvsLookUpColumnInfo(CommonKey.Period);
                //IvsLookUpColumnInfo columnPeriodName = new IvsLookUpColumnInfo(CommonKey.Period);
                this.Properties.Columns.Add(columnPeriodCode);
                //this.Properties.Columns.Add(columnPeriodName);
                this.Properties.Columns[CommonKey.Period].Caption = CommonData.StringEmpty;
                //this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.Period;
                this.Properties.ValueMember   = CommonKey.Period;
            }
            else if (this.Code.Equals(CommonData.FunctionGr.INV_Invoice))
            {
                IvsLookUpColumnInfo invNo = new IvsLookUpColumnInfo(CommonKey.InvNo);
                this.Properties.Columns.Add(invNo);
                this.Properties.Columns[CommonKey.InvNo].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.InvNo;
                this.Properties.ValueMember   = CommonKey.InvNo;
            }
            //else if (this.Code.Equals(CommonData.FunctionGr.MS_Items))
            //{
            //    IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.Code);
            //    IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name);
            //    IvsLookUpColumnInfo columnUnit = new IvsLookUpColumnInfo(CommonKey.InvUnitCode);
            //    this.Properties.Columns.Add(columnCode);
            //    this.Properties.Columns.Add(columnName);
            //    this.Properties.Columns.Add(columnUnit);
            //    this.Properties.Columns[CommonKey.Code].Caption = CommonData.StringEmpty;
            //    this.Properties.Columns[CommonKey.Name].Caption = CommonData.StringEmpty;
            //    this.Properties.Columns[CommonKey.InvUnitCode].Caption = CommonData.StringEmpty;
            //    this.Properties.DisplayMember = CommonKey.DisplayName;
            //    this.Properties.ValueMember = CommonKey.Code;
            //}
            else if (this.Code.Equals(CommonData.FunctionGr.SY_Functions))
            {
                if (UserSession.LangId != null)
                {
                    if (UserSession.LangId.Equals((CommonData.Language.VietNamese)))
                    {
                        IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                        IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name1);
                        this.Properties.Columns.Add(columnCode);
                        this.Properties.Columns.Add(columnName);
                        this.Properties.Columns[CommonKey.FunctionId].Caption = CommonData.StringEmpty;
                        this.Properties.Columns[CommonKey.Name1].Caption      = CommonData.StringEmpty;
                        this.Properties.DisplayMember = CommonKey.Name1;
                        this.Properties.ValueMember   = CommonKey.FunctionId;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.English)))
                    {
                        IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                        IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name2);
                        this.Properties.Columns.Add(columnCode);
                        this.Properties.Columns.Add(columnName);
                        this.Properties.Columns[CommonKey.FunctionId].Caption = CommonData.StringEmpty;
                        this.Properties.Columns[CommonKey.Name2].Caption      = CommonData.StringEmpty;
                        this.Properties.DisplayMember = CommonKey.Name2;
                        this.Properties.ValueMember   = CommonKey.FunctionId;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.Japanese)))
                    {
                        IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                        IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name3);
                        this.Properties.Columns.Add(columnCode);
                        this.Properties.Columns.Add(columnName);
                        this.Properties.Columns[CommonKey.FunctionId].Caption = CommonData.StringEmpty;
                        this.Properties.Columns[CommonKey.Name3].Caption      = CommonData.StringEmpty;
                        this.Properties.DisplayMember = CommonKey.Name3;
                        this.Properties.ValueMember   = CommonKey.FunctionId;
                    }
                }
                else
                {
                    IvsLookUpColumnInfo columnCode = new IvsLookUpColumnInfo(CommonKey.FunctionId);
                    IvsLookUpColumnInfo columnName = new IvsLookUpColumnInfo(CommonKey.Name2);
                    this.Properties.Columns.Add(columnCode);
                    this.Properties.Columns.Add(columnName);
                    this.Properties.Columns[CommonKey.Code].Caption  = CommonData.StringEmpty;
                    this.Properties.Columns[CommonKey.Name2].Caption = CommonData.StringEmpty;
                    this.Properties.DisplayMember = CommonKey.Name2;
                    this.Properties.ValueMember   = CommonKey.Code;
                }
            }
            else if (this.Code.Equals(CommonData.FunctionGr.CurrentPeriod_Document))
            {
                IvsLookUpColumnInfo documentNumber = new IvsLookUpColumnInfo(CommonKey.DocumentNumber);
                this.Properties.Columns.Add(documentNumber);
                this.Properties.Columns[CommonKey.DocumentNumber].Caption = CommonData.StringEmpty;
                this.Properties.DisplayMember = CommonKey.DocumentNumber;
                this.Properties.ValueMember   = CommonKey.DocumentNumber;
            }
            else
            {
                if (UserSession.LangId == null)
                {
                    IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                    IvsLookUpColumnInfo columnName2 = new IvsLookUpColumnInfo(CommonKey.Name2);
                    this.Properties.Columns.Add(columnCode);
                    this.Properties.Columns.Add(columnName2);
                    this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                    this.Properties.Columns[CommonKey.Name2].Caption       = CommonData.StringEmpty;
                    this.Properties.DisplayMember = CommonKey.Name2;
                    this.Properties.ValueMember   = CommonData.CommonCode;
                }
                else
                {
                    if (UserSession.LangId.Equals((CommonData.Language.VietNamese)))
                    {
                        IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                        IvsLookUpColumnInfo columnName1 = new IvsLookUpColumnInfo(CommonKey.Name1);
                        this.Properties.Columns.Add(columnCode);
                        this.Properties.Columns.Add(columnName1);
                        this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                        this.Properties.Columns[CommonKey.Name1].Caption       = CommonData.StringEmpty;
                        this.Properties.DisplayMember = CommonKey.Name1;
                        this.Properties.ValueMember   = CommonData.CommonCode;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.English)))
                    {
                        IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                        IvsLookUpColumnInfo columnName2 = new IvsLookUpColumnInfo(CommonKey.Name2);
                        this.Properties.Columns.Add(columnCode);
                        this.Properties.Columns.Add(columnName2);
                        this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                        this.Properties.Columns[CommonKey.Name2].Caption       = CommonData.StringEmpty;
                        this.Properties.DisplayMember = CommonKey.Name2;
                        this.Properties.ValueMember   = CommonData.CommonCode;
                    }
                    else if (UserSession.LangId.Equals((CommonData.Language.Japanese)))
                    {
                        IvsLookUpColumnInfo columnCode  = new IvsLookUpColumnInfo(CommonData.CommonCode);
                        IvsLookUpColumnInfo columnName3 = new IvsLookUpColumnInfo(CommonKey.Name3);
                        this.Properties.Columns.Add(columnCode);
                        this.Properties.Columns.Add(columnName3);
                        this.Properties.Columns[CommonData.CommonCode].Caption = CommonData.StringEmpty;
                        this.Properties.Columns[CommonKey.Name3].Caption       = CommonData.StringEmpty;
                        this.Properties.DisplayMember = CommonKey.Name3;
                        this.Properties.ValueMember   = CommonData.CommonCode;
                    }
                }
            }
        }