リビジョン 225
サブフォーム表示位置変更
見積書割当チェック不具合修正
台帳未作成チェック画面不具合修正
協力会社検索画面履歴増減工事対応
工事基本情報注文書データ複数対応
工事基本情報請求書データ分割対応(途中)
| CommonMotions.cs | ||
|---|---|---|
| 1702 | 1702 |
/// <param name="chgColor"></param> |
| 1703 | 1703 |
public static void chgBackColor(object objCtrl, bool bPara) |
| 1704 | 1704 |
{
|
| 1705 |
if (objCtrl.GetType().Equals(typeof(TextBox)) || objCtrl.GetType().Equals(typeof(TextBoxEX)))
|
|
| 1705 |
try
|
|
| 1706 | 1706 |
{
|
| 1707 |
TextBox wrk = (TextBox)objCtrl; |
|
| 1708 |
if (bPara) |
|
| 1707 |
if (objCtrl.GetType().Equals(typeof(TextBox)) || objCtrl.GetType().Equals(typeof(TextBoxEX))) |
|
| 1709 | 1708 |
{
|
| 1710 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1709 |
TextBox wrk = (TextBox)objCtrl; |
|
| 1710 |
if (bPara) |
|
| 1711 |
{
|
|
| 1712 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1713 |
} |
|
| 1714 |
else |
|
| 1715 |
{
|
|
| 1716 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1717 |
wrk.Focus(); |
|
| 1718 |
} |
|
| 1711 | 1719 |
} |
| 1712 |
else |
|
| 1720 |
else if (objCtrl.GetType().Equals(typeof(DataGridViewTextBoxCell)))
|
|
| 1713 | 1721 |
{
|
| 1714 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1715 |
wrk.Focus(); |
|
| 1722 |
DataGridViewTextBoxCell wrk = (DataGridViewTextBoxCell)objCtrl; |
|
| 1723 |
if (bPara) |
|
| 1724 |
{
|
|
| 1725 |
wrk.Style.BackColor = CommonDefine.s_clrNormal; |
|
| 1726 |
} |
|
| 1727 |
else |
|
| 1728 |
{
|
|
| 1729 |
wrk.Style.BackColor = CommonDefine.s_clrError; |
|
| 1730 |
wrk.Selected = true; |
|
| 1731 |
} |
|
| 1716 | 1732 |
} |
| 1717 |
} |
|
| 1718 |
else if (objCtrl.GetType().Equals(typeof(DataGridViewTextBoxCell))) |
|
| 1719 |
{
|
|
| 1720 |
DataGridViewTextBoxCell wrk = (DataGridViewTextBoxCell)objCtrl; |
|
| 1721 |
if (bPara) |
|
| 1733 |
else if (objCtrl.GetType().Equals(typeof(ComboBoxEX))) |
|
| 1722 | 1734 |
{
|
| 1723 |
wrk.Style.BackColor = CommonDefine.s_clrNormal; |
|
| 1735 |
ComboBox wrk = (ComboBox)objCtrl; |
|
| 1736 |
if (bPara) |
|
| 1737 |
{
|
|
| 1738 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1739 |
} |
|
| 1740 |
else |
|
| 1741 |
{
|
|
| 1742 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1743 |
wrk.Focus(); |
|
| 1744 |
} |
|
| 1724 | 1745 |
} |
| 1725 |
else |
|
| 1746 |
else if (objCtrl.GetType().Equals(typeof(ComboBox)))
|
|
| 1726 | 1747 |
{
|
| 1727 |
wrk.Style.BackColor = CommonDefine.s_clrError; |
|
| 1728 |
wrk.Selected = true; |
|
| 1748 |
ComboBox wrk = (ComboBox)objCtrl; |
|
| 1749 |
if (bPara) |
|
| 1750 |
{
|
|
| 1751 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1752 |
} |
|
| 1753 |
else |
|
| 1754 |
{
|
|
| 1755 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1756 |
wrk.Focus(); |
|
| 1757 |
} |
|
| 1729 | 1758 |
} |
| 1730 |
} |
|
| 1731 |
else if (objCtrl.GetType().Equals(typeof(ComboBoxEX))) |
|
| 1732 |
{
|
|
| 1733 |
ComboBox wrk = (ComboBox)objCtrl; |
|
| 1734 |
if (bPara) |
|
| 1759 |
else if (objCtrl.GetType().Equals(typeof(ListBox))) |
|
| 1735 | 1760 |
{
|
| 1736 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1761 |
ListBox wrk = (ListBox)objCtrl; |
|
| 1762 |
if (bPara) |
|
| 1763 |
{
|
|
| 1764 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1765 |
} |
|
| 1766 |
else |
|
| 1767 |
{
|
|
| 1768 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1769 |
wrk.Focus(); |
|
| 1770 |
} |
|
| 1737 | 1771 |
} |
| 1738 |
else |
|
| 1772 |
else if (objCtrl.GetType().Equals(typeof(Label)))
|
|
| 1739 | 1773 |
{
|
| 1740 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1741 |
wrk.Focus(); |
|
| 1774 |
Label wrk = (Label)objCtrl; |
|
| 1775 |
if (bPara) |
|
| 1776 |
{
|
|
| 1777 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1778 |
} |
|
| 1779 |
else |
|
| 1780 |
{
|
|
| 1781 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1782 |
} |
|
| 1742 | 1783 |
} |
| 1743 |
} |
|
| 1744 |
else if (objCtrl.GetType().Equals(typeof(ComboBox))) |
|
| 1745 |
{
|
|
| 1746 |
ComboBox wrk = (ComboBox)objCtrl; |
|
| 1747 |
if (bPara) |
|
| 1784 |
else if (objCtrl.GetType().Equals(typeof(NumericUpDown))) |
|
| 1748 | 1785 |
{
|
| 1749 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1786 |
NumericUpDown wrk = (NumericUpDown)objCtrl; |
|
| 1787 |
if (bPara) |
|
| 1788 |
{
|
|
| 1789 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1790 |
} |
|
| 1791 |
else |
|
| 1792 |
{
|
|
| 1793 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1794 |
} |
|
| 1750 | 1795 |
} |
| 1751 |
else |
|
| 1752 |
{
|
|
| 1753 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1754 |
wrk.Focus(); |
|
| 1755 |
} |
|
| 1756 | 1796 |
} |
| 1757 |
else if (objCtrl.GetType().Equals(typeof(ListBox)))
|
|
| 1797 |
catch (Exception ex)
|
|
| 1758 | 1798 |
{
|
| 1759 |
ListBox wrk = (ListBox)objCtrl; |
|
| 1760 |
if (bPara) |
|
| 1761 |
{
|
|
| 1762 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1763 |
} |
|
| 1764 |
else |
|
| 1765 |
{
|
|
| 1766 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1767 |
wrk.Focus(); |
|
| 1768 |
} |
|
| 1799 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", GetMethodName(), GetMethodName(2), ex.Message);
|
|
| 1769 | 1800 |
} |
| 1770 |
else if (objCtrl.GetType().Equals(typeof(Label))) |
|
| 1771 |
{
|
|
| 1772 |
Label wrk = (Label)objCtrl; |
|
| 1773 |
if (bPara) |
|
| 1774 |
{
|
|
| 1775 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1776 |
} |
|
| 1777 |
else |
|
| 1778 |
{
|
|
| 1779 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1780 |
} |
|
| 1781 |
} |
|
| 1782 |
else if (objCtrl.GetType().Equals(typeof(NumericUpDown))) |
|
| 1783 |
{
|
|
| 1784 |
NumericUpDown wrk = (NumericUpDown)objCtrl; |
|
| 1785 |
if (bPara) |
|
| 1786 |
{
|
|
| 1787 |
wrk.BackColor = CommonDefine.s_clrNormal; |
|
| 1788 |
} |
|
| 1789 |
else |
|
| 1790 |
{
|
|
| 1791 |
wrk.BackColor = CommonDefine.s_clrError; |
|
| 1792 |
} |
|
| 1793 |
} |
|
| 1794 | 1801 |
} |
| 1795 | 1802 |
|
| 1796 | 1803 |
#endregion |
他の形式にエクスポート: Unified diff