| using System; | 
| using System.Collections.Generic; | 
| using System.ComponentModel; | 
| using System.Data; | 
| using System.Drawing; | 
| using System.Text; | 
| using System.Windows.Forms; | 
|   | 
| namespace DAL | 
| { | 
|     public partial class frm_S_BillQueryCondition_New1 : Pub_Control.frm_S_BillQueryCondition_Base | 
|     { | 
|         public frm_S_BillQueryCondition_New1() | 
|         { | 
|             InitializeComponent(); | 
|         } | 
|   | 
|          | 
|   | 
|         //°ïÖúº¯Êý | 
|         public override void Sub_GridKeyView(int sKeyCode, int sRow, int sCol, DataGridView grdCondition, DataGridViewTextBoxEditingControl oEdit) | 
|         { | 
|             DAL.ClsK3_Department_View oDept = new DAL.ClsK3_Department_View(); | 
|             DAL.ClsK3_Customer_View oCus = new DAL.ClsK3_Customer_View(); | 
|             DAL.ClsK3_Currency_View oCur = new DAL.ClsK3_Currency_View(); | 
|             DAL.ClsK3_Employee_View oEmp = new DAL.ClsK3_Employee_View(); | 
|             DAL.ClsK3_Material_View oMat = new DAL.ClsK3_Material_View(); | 
|             DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View(); | 
|             DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View(); | 
|             DAL.ClsGy_Process_View oProc = new DAL.ClsGy_Process_View(); | 
|             DAL.ClsK3_Supplier_View oSup = new DAL.ClsK3_Supplier_View(); | 
|             DAL.ClsK3_Warehouse_View oWare = new DAL.ClsK3_Warehouse_View(); | 
|             int FieldNameCol = 2; | 
|             int ConditionCol = 4; | 
|             if (sCol != ConditionCol) | 
|                 return; | 
|             switch (sKeyCode) | 
|             { | 
|                 case 118: | 
|                     { | 
|                         switch (grdCondition.Rows[sRow].Cells[FieldNameCol].Value.ToString()) | 
|                         { | 
|   | 
|                             case "²Ö¿â´úÂë": | 
|                             case "ÊÕÁϲֿâ´úÂë": | 
|                             case "·¢Áϲֿâ´úÂë": | 
|                             case "·¢»õ²Ö¿â´úÂë": | 
|                             case "µ÷Èë²Ö¿â´úÂë": | 
|                             case "µ÷³ö²Ö¿â´úÂë": | 
|                                 if (oWare.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oWare.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "²Ö¿â": | 
|                             case "ÊÕÁϲֿâ": | 
|                             case "·¢Áϲֿâ": | 
|                             case "·¢»õ²Ö¿â": | 
|                             case "µ÷Èë²Ö¿â": | 
|                             case "µ÷³ö²Ö¿â": | 
|                                 if (oWare.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oWare.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "²¿ÃÅ": | 
|                             case "²¿ÃÅÃû³Æ": | 
|                             case "Éú²ú³µ¼äÃû³Æ": | 
|                                 if (oDept.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oDept.oModel.HName.Trim(); | 
|   | 
|                                 } | 
|                                 break; | 
|                             case "²¿ÃÅ´úÂë": | 
|                             case "Éú²ú³µ¼ä´úÂë": | 
|                                 if (oDept.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oDept.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "¹¤Ðò": | 
|                             case "¹¤ÐòÃû³Æ": | 
|                                 if (oProc.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oProc.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "¹¤Ðò´úÂë": | 
|                                 if (oProc.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oProc.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "°à×é": | 
|                             case "°à×éÃû³Æ": | 
|                                 if (oGroup.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oGroup.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "°à×é´úÂë": | 
|                                 if (oGroup.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oGroup.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|   | 
|                             case "¹©Ó¦ÉÌ": | 
|                             case "¹©Ó¦ÉÌÃû³Æ": | 
|                                 if (oSup.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oSup.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "¹©Ó¦ÉÌ´úÂë": | 
|                                 if (oSup.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oSup.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "¿Í»§": | 
|                             case "¿Í»§Ãû³Æ": | 
|                                 if (oCus.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCus.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "¿Í»§´úÂë": | 
|                                 if (oCus.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCus.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "±Ò±ð": | 
|                             case "±Ò±ðÃû³Æ": | 
|                             case "»õ±Ò": | 
|                                 if (oCur.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCur.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "±Ò±ð´úÂë": | 
|                             case "»õ±Ò´úÂë": | 
|                                 if (oCur.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oCur.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "ÒµÎñÔ±": | 
|                             case "ÒµÎñÔ±Ãû³Æ": | 
|                             case "Ö°Ô±": | 
|                             case "Ö°Ô±Ãû³Æ": | 
|                             case "Ö÷¹Ü": | 
|                             case "¸ºÔðÈË": | 
|                             case "±£¹ÜÔ±": | 
|                             case "ÑéÊÕÔ±": | 
|                             case "ÁìÁÏÔ±": | 
|                             case "¾°ìÈË": | 
|                             case "²Ù×÷Ô±Ãû³Æ": | 
|                             case "Ö÷¹ÜÃû³Æ": | 
|                                 if (oEmp.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oEmp.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "ÒµÎñÔ±´úÂë": | 
|                             case "Ö÷¹Ü´úÂë": | 
|                             case "¸ºÔðÈË´úÂë": | 
|                             case "±£¹ÜÔ±´úÂë": | 
|                             case "ÑéÊÕÔ±´úÂë": | 
|                             case "ÁìÁÏÔ±´úÂë": | 
|                             case "¾°ìÈË´úÂë": | 
|                             case "²Ù×÷Ô±´úÂë": | 
|                             case "Ö°Ô±´úÂë": | 
|                                 if (oEmp.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oEmp.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "ÎïÁÏÃû³Æ": | 
|                             case "Ö÷¼þÎïÁÏÃû³Æ": | 
|                                 if (oMat.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oMat.omodel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "ÎïÁÏ´úÂë": | 
|                             case "Ö÷¼þÎïÁÏ´úÂë": | 
|                                 if (oMat.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oMat.omodel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "¼ÆÁ¿µ¥Î»": | 
|                             case "¼ÆÁ¿µ¥Î»Ãû³Æ": | 
|                             case "Ö÷¼þ¼ÆÁ¿µ¥Î»Ãû³Æ": | 
|                                 if (oUnit.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oUnit.oModel.HName.Trim(); | 
|                                 } | 
|                                 break; | 
|                             case "¼ÆÁ¿µ¥Î»´úÂë": | 
|                             case "Ö÷¼þ¼ÆÁ¿µ¥Î»´úÂë": | 
|                                 if (oUnit.RefreshView()) | 
|                                 { | 
|                                     grdCondition.Rows[sRow].Cells[ConditionCol].Value = oUnit.oModel.HNumber.Trim(); | 
|                                 } | 
|                                 break; | 
|                             default: | 
|                                 break; | 
|                         } | 
|                         oEdit.Text = DBUtility.ClsPub.isStrNull(grdCondition.Rows[sRow].Cells[ConditionCol].Value); | 
|                         break; | 
|                     } | 
|                 case 117: | 
|                     MessageBox.Show("´Ë¹¦ÄÜÉÐ먦·Å£¡", "Ìáʾ"); | 
|                     break; | 
|                 default: | 
|                     break; | 
|             } | 
|         } | 
|     } | 
| } |