예제 #1
0
 public Boolean CreatePanel(Hashtable temp, MESDBHelper.OleExec SFCDB, MESDataObject.DB_TYPE_ENUM _DBType)
 {
     try
     {
         T_R_PANEL_SN   tPanel = new T_R_PANEL_SN(SFCDB, _DBType);
         Row_R_PANEL_SN rPanel = (Row_R_PANEL_SN)tPanel.NewRow();
         rPanel.ID          = tPanel.GetNewID(temp["BU"].ToString(), SFCDB);
         rPanel.PANEL       = temp["Panel"].ToString();
         rPanel.SN          = rPanel.ID;
         rPanel.WORKORDERNO = temp["WO"].ToString();
         rPanel.SEQ_NO      = 0;
         rPanel.EDIT_EMP    = temp["User"].ToString();
         rPanel.EDIT_TIME   = DateTime.Now;
         string strRet = SFCDB.ExecSQL(rPanel.GetInsertString(_DBType));
         if (Convert.ToInt32(strRet) > 0)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
예제 #2
0
        public Boolean AddSnToPanel(Hashtable temp, MESDBHelper.OleExec SFCDB, MESDataObject.DB_TYPE_ENUM _DBType)
        {
            string strSn = temp["SN"].ToString();
            SN     sn    = new SN(strSn, SFCDB, _DBType);
            string wo    = sn.WorkorderNo;

            if (wo != this.PanelCollection[0].WORKORDERNO)
            {
                return(false);
            }
            T_R_PANEL_SN   tPanel = new T_R_PANEL_SN(SFCDB, _DBType);
            Row_R_PANEL_SN rPanel = (Row_R_PANEL_SN)tPanel.NewRow();

            rPanel.ID          = tPanel.GetNewID(temp["BU"].ToString(), SFCDB);
            rPanel.SN          = temp["SNID"].ToString();
            rPanel.PANEL       = this.PanelNo;
            rPanel.WORKORDERNO = wo;
            rPanel.SEQ_NO      = this.PanelCollection.Count;
            rPanel.EDIT_EMP    = temp["User"].ToString();
            rPanel.EDIT_TIME   = DateTime.Now;
            string strRet = SFCDB.ExecSQL(rPanel.GetInsertString(_DBType));

            if (Convert.ToInt32(strRet) > 0)
            {
                this.PanelCollection.Add(rPanel.GetDataObject());
                return(true);
            }
            return(false);
        }