Esempio n. 1
0
        public DataSet GetTableConstruct(OleExec sfcdb)
        {
            string  strSQL = "select * from r_backflush_check where 1<1";
            DataSet dtset  = sfcdb.ExecuteDataSet(strSQL, CommandType.Text);

            return(dtset);
        }
Esempio n. 2
0
        public DataSet GetSNCountByWO(string wono, OleExec sfcdb)
        {
            string  sqlString = $@"select count(distinct(r.sn ) ) C from r_mrb r where workorderno= '{wono}'";
            DataSet dtset     = sfcdb.ExecuteDataSet(sqlString, CommandType.Text);

            return(dtset);
        }
        public DataSet GetBackFlushData(string wono, string sapstation, OleExec sfcdb)
        {
            string  sqlString = $@"select nvl(sum(r.diff_qty),0) C  
                             from r_backflush_history r
                             where r.workorderno = '{wono}'
                             and r.sap_station = '{sapstation}'
                             and r.result='Y'";
            DataSet dtset     = sfcdb.ExecuteDataSet(sqlString, CommandType.Text);

            return(dtset);
        }
Esempio n. 4
0
        public static string GetPostDate(OleExec sfcdb)
        {
            string strPostDATE = "";
            string sqlString   = $@"select to_char((to_date(a.control_value, 'mm/dd/yyyy') - sysdate)) as C,
                                  a.control_value as DAT,
                                  to_char(sysdate, 'mm/dd/yyyy') as NOW
                                  from c_control a where upper(CONTROL_NAME)='BACKFLUSHPOSTEDATE'";

            DataSet postDate = sfcdb.ExecuteDataSet(sqlString, CommandType.Text);

            if (float.Parse(postDate.Tables[0].Rows[0]["C"].ToString()) > 0)
            {
                strPostDATE = postDate.Tables[0].Rows[0]["DAT"].ToString();
            }
            else
            {
                strPostDATE = postDate.Tables[0].Rows[0]["NOW"].ToString();
            }
            return(strPostDATE);
        }