pmp 재고 조회 기능 추가
This commit is contained in:
		
							
								
								
									
										116
									
								
								SubProject/FPJ0000/Project/fSPMaster.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										116
									
								
								SubProject/FPJ0000/Project/fSPMaster.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,116 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.ComponentModel; | ||||
| using System.Data; | ||||
| using System.Drawing; | ||||
| using System.Linq; | ||||
| using System.Text; | ||||
| using System.Windows.Forms; | ||||
|  | ||||
| namespace FPJ0000 | ||||
| { | ||||
|     public partial class fSPMaster :FCOMMON.fBase | ||||
|     { | ||||
|         public int qty = 0; | ||||
|  | ||||
|         string search = string.Empty; | ||||
|         int idx = -1; | ||||
|         public fSPMaster(string search_) | ||||
|         { | ||||
|             InitializeComponent(); | ||||
|             this.WindowState = FormWindowState.Normal; | ||||
|             this.StartPosition = FormStartPosition.CenterScreen; | ||||
|             this.search = search_; | ||||
|             this.tbFind.Text = search_; | ||||
|             this.KeyDown += (s1, e1) => { | ||||
|                 if (e1.KeyCode == Keys.Escape) this.Close(); | ||||
|             }; | ||||
|         } | ||||
|  | ||||
|         private void __Load(object sender, EventArgs e) | ||||
|         { | ||||
|             this.Show(); | ||||
|             Application.DoEvents(); | ||||
|             button1.PerformClick(); | ||||
|         } | ||||
|         void refreshData(string div) | ||||
|         { | ||||
|             this.ta.Fill(this.dsMSSQL.SPMaster, "%" + div + "%"); | ||||
|         } | ||||
|      | ||||
|  | ||||
|         private void bs_CurrentChanged(object sender, EventArgs e) | ||||
|         { | ||||
|             idx = -1; | ||||
|             var drv = bs.Current as DataRowView; | ||||
|             if (drv == null) return; | ||||
|             var dr = drv.Row as dsPRJ.SPMasterRow;//.minutesRow; | ||||
|             idx = dr.ID; | ||||
|         } | ||||
|  | ||||
|         private void toolStripButton2_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             try | ||||
|             { | ||||
|                 var cnt = this.ta.Update(this.dsMSSQL.SPMaster); | ||||
|             } | ||||
|             catch (Exception ex) | ||||
|             { | ||||
|                 FCOMMON.Util.MsgE(ex.Message); | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         private void 목록새로고침ToolStripMenuItem_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             this.refreshData(this.search); | ||||
|         } | ||||
|  | ||||
|         //void Find() | ||||
|         //{ | ||||
|         //    var txt = tbFind.Text.Trim(); | ||||
|         //    if (txt == "") | ||||
|         //    { | ||||
|         //        if(bs.Filter != "") | ||||
|         //        { | ||||
|         //            bs.Filter = ""; | ||||
|         //            tbFind.BackColor = Color.WhiteSmoke; | ||||
|         //        } | ||||
|         //        tbFind.Focus(); | ||||
|         //        return; | ||||
|         //    } | ||||
|  | ||||
|         //    //검색어가 잇으므로 검색을 수행한다 | ||||
|         //    var cols = new string[] { "SIDNo","Storage","Location", | ||||
|         //    "PartName","PartNo","Memo","CostCenter","Enrollee"}; | ||||
|         //    string filter = ""; | ||||
|         //    foreach(var col in cols) | ||||
|         //    { | ||||
|         //        if (filter != "") filter += " or "; | ||||
|         //        filter += col + " like '%"+ txt.Replace("'","''") +"%' "; | ||||
|         //    } | ||||
|         //    try | ||||
|         //    { | ||||
|         //        this.bs.Filter = filter; | ||||
|         //        tbFind.BackColor = Color.Lime; | ||||
|         //        tbFind.SelectAll(); | ||||
|         //    }catch (Exception ex) | ||||
|         //    { | ||||
|         //        this.bs.Filter = ""; | ||||
|         //        tbFind.BackColor = Color.Red; | ||||
|         //        FCOMMON.Util.MsgE(ex.Message); | ||||
|         //    } | ||||
|         //} | ||||
|  | ||||
|         private void button1_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             refreshData(tbFind.Text.Trim()); | ||||
|         } | ||||
|  | ||||
|         private void tbFind_KeyDown(object sender, KeyEventArgs e) | ||||
|         { | ||||
|             if (e.KeyCode == Keys.Enter) | ||||
|                 button1.PerformClick(); | ||||
|         } | ||||
|  | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 chi
					chi