Пример #1
0
        public void DeleteStationAction(String ID, OleExec sfcdb)
        {
            string             DeleteSql = "";
            T_R_Station_Action stationaction;

            try
            {
                stationaction = new T_R_Station_Action(sfcdb, DBTYPE);

                if (stationaction.CheckDataExistByID(ID, sfcdb))
                {
                    Row_R_Station_Action row = (Row_R_Station_Action)stationaction.GetObjByID(ID, sfcdb);
                    DeleteSql = row.GetDeleteString(DBTYPE);
                    sfcdb.ExecSQL(DeleteSql);
                }
            }
            catch (Exception e)
            {
                //  this.DBPools["SFCDB"].Return(sfcdb);
                throw e;
            }
        }
Пример #2
0
        public void AddStationAction(Newtonsoft.Json.Linq.JToken Data, OleExec sfcdb)
        {
            //OleExec sfcdb = null;
            string             InsertSql = "";
            T_R_Station_Action input;
            string             ID = Data["ID"].ToString();
            string             RStationInputID  = Data["R_STATION_INPUT_ID"].ToString();
            string             CStationActionID = Data["C_STATION_ACTION_ID"].ToString();
            double             SeqNo            = Convert.ToDouble(Data["SEQ_NO"]);
            string             ConfigType       = Data["CONFIG_TYPE"].ToString();
            string             ConfigValue      = Data["CONFIG_VALUE"].ToString();
            double             AddFlag          = Convert.ToDouble(Data["ADD_FLAG"]);

            try
            {
                input = new T_R_Station_Action(sfcdb, DBTYPE);
                DeleteStationAction(ID, sfcdb);
                Row_R_Station_Action row = (Row_R_Station_Action)input.NewRow();
                row.ID = ID;
                row.R_STATION_INPUT_ID  = RStationInputID;
                row.C_STATION_ACTION_ID = CStationActionID;
                row.SEQ_NO       = SeqNo;
                row.CONFIG_TYPE  = ConfigType;
                row.CONFIG_VALUE = ConfigValue;
                row.ADD_FLAG     = AddFlag;
                row.EDIT_EMP     = LoginUser.EMP_NO;
                row.EDIT_TIME    = GetDBDateTime();
                InsertSql        = row.GetInsertString(DBTYPE);
                sfcdb.ExecSQL(InsertSql);
            }
            catch (Exception e)
            {
                //  this.DBPools["SFCDB"].Return(sfcdb);
                throw e;
            }
        }