Example #1
0
        private string GetValue(MasterDataSet.MasterDataTable masterDataTable, string code, string codeSub, string defaultValue)
        {
            foreach (MasterDataSet.MasterRow row in masterDataTable.Rows)
            {
                if (row.Code == code && row.CodeSub == codeSub)
                {
                    return(row.Content);
                }
            }

            return(defaultValue);
        }
Example #2
0
        private void SetValue(MasterDataSet.MasterDataTable masterDataTable, string code, string codeSub, string value)
        {
            foreach (MasterDataSet.MasterRow row in masterDataTable.Rows)
            {
                if (row.Code == code && row.CodeSub == codeSub)
                {
                    row.Content = value;
                    return;
                }
            }

            masterDataTable.AddMasterRow(code, codeSub, value);
        }