public static void SaveCurrentPostRecord(MD_GuideLine_ParamSetting SavedSetting, string _queryStr, MySqlConnection cn)
        {
            MySqlCommand _cmd = new MySqlCommand(ChangeSetting, cn);

            _cmd.Parameters.Add(new MySqlParameter("@CS", SavedSetting.ParamMeta));
            _cmd.Parameters.Add(new MySqlParameter("@QUERYSQL", _queryStr));
            _cmd.Parameters.Add(new MySqlParameter("@ZBID", Convert.ToInt64(SavedSetting.GuideLineID)));
            //  _cmd.Parameters.Add(new MySqlParameter("@DWID", Convert.ToInt64(000)));
            _cmd.ExecuteNonQuery();
        }
Esempio n. 2
0
        public static void SaveCurrentPostRecord(MD_GuideLine_ParamSetting SavedSetting, string _queryStr, SqlConnection cn)
        {
            SqlCommand _cmd = new SqlCommand(ChangeSetting, cn);

            _cmd.Parameters.Add(":CS", SavedSetting.ParamMeta);
            _cmd.Parameters.Add(":QUERYSQL", _queryStr);
            _cmd.Parameters.Add(":ZBID", decimal.Parse(SavedSetting.GuideLineID));
            _cmd.Parameters.Add(":DWID", SinoUserCtx.CurUser.CurrentPost.PostDwID);
            _cmd.ExecuteNonQuery();
        }
        public static MD_GuideLine_ParamSetting GetDefaultRecord(string _guideLineID, MySqlConnection cn)
        {
            MD_GuideLine_ParamSetting _ret = null;
            long   _csid = Lib.Snowflake.Instance.NextId();
            string _zbid = _guideLineID;
            string _dwid = "000";

            _ret = new MD_GuideLine_ParamSetting(_csid.ToString(), _zbid, _dwid, "");

            return(_ret);
        }
Esempio n. 4
0
        public static MD_GuideLine_ParamSetting GetDefaultRecord(string _guideLineID, SqlConnection cn)
        {
            MD_GuideLine_ParamSetting _ret = null;
            string     _sql  = "select SEQUENCES_META.nextval from dual ";
            SqlCommand _cmd  = new SqlCommand(_sql, cn);
            decimal    _csid = (decimal)_cmd.ExecuteScalar();
            string     _zbid = _guideLineID;
            string     _dwid = SinoUserCtx.CurUser.CurrentPost.PostDwID;

            _ret = new MD_GuideLine_ParamSetting(_csid.ToString(), _zbid, _dwid, "");

            return(_ret);
        }
Esempio n. 5
0
        private void ShowFocusNodeParamSetting()
        {
            TreeListNode _cNode = this.treeList1.FocusedNode;

            if (_cNode != null)
            {
                MD_GuideLine _cGuideLine = _cNode.GetValue(this.treeListColumn1) as MD_GuideLine;
                using (MetaDataQueryServiceClient _msc = new MetaDataQueryServiceClient())
                {
                    CurrentParamSetting = _msc.GetGuideLineParamSetting(_cGuideLine.ID);
                }
                if (CurrentParamSetting != null)
                {
                    ShowParams(_cGuideLine);
                }
            }
        }
Esempio n. 6
0
        public static MD_GuideLine_ParamSetting GetCurrentPostRecord(string _guideLineID, SqlConnection cn)
        {
            MD_GuideLine_ParamSetting _ret = null;
            string     _sql = "select CSID,ZBID,DWID,CS from tj_zdyzbdyb_cs where zbid =:ZBID and dwid=:DWID ";
            SqlCommand _cmd = new SqlCommand(_sql, cn);

            _cmd.Parameters.Add(":ZBID", decimal.Parse(_guideLineID));
            _cmd.Parameters.Add(":DWID", decimal.Parse(SinoUserCtx.CurUser.CurrentPost.PostDwID));
            using (SqlDataReader _dr = _cmd.ExecuteReader())
            {
                while (_dr.Read())
                {
                    string _csid = _dr.IsDBNull(0) ? "" : _dr.GetDouble(0).ToString();
                    string _zbid = _dr.IsDBNull(1) ? "" : _dr.GetDouble(1).ToString();
                    string _dwid = _dr.IsDBNull(2) ? "" : _dr.GetDouble(2).ToString();
                    string _cs   = _dr.IsDBNull(3) ? "" : _dr.GetString(3);
                    _ret = new MD_GuideLine_ParamSetting(_csid, _zbid, _dwid, _cs);
                }
            }
            return(_ret);
        }
        public static MD_GuideLine_ParamSetting GetCurrentPostRecord(string _guideLineID, MySqlConnection cn)
        {
            MD_GuideLine_ParamSetting _ret = null;
            string       _sql = "select CSID,ZBID,DWID,CS from tj_zdyzbdyb_cs where zbid =@ZBID  ";
            MySqlCommand _cmd = new MySqlCommand(_sql, cn);

            _cmd.Parameters.Add(new MySqlParameter("@ZBID", Convert.ToInt64(_guideLineID)));
            // _cmd.Parameters.Add(new MySqlParameter("@DWID", Convert.ToInt64(000)));
            using (MySqlDataReader _dr = _cmd.ExecuteReader())
            {
                while (_dr.Read())
                {
                    string _csid = _dr.IsDBNull(0) ? "" : _dr.GetDecimal(0).ToString();
                    string _zbid = _dr.IsDBNull(1) ? "" : _dr.GetDecimal(1).ToString();
                    string _dwid = _dr.IsDBNull(2) ? "" : _dr.GetDecimal(2).ToString();
                    string _cs   = _dr.IsDBNull(3) ? "" : _dr.GetString(3);
                    _ret = new MD_GuideLine_ParamSetting(_csid, _zbid, _dwid, _cs);
                }
            }
            return(_ret);
        }
Esempio n. 8
0
        public bool SaveGuideLineParamSetting(MD_GuideLine_ParamSetting _paramSetting, List <Base.MetaData.QueryModel.MDQuery_GuideLineParameter> _paramters)
        {
            OraMetaDataQueryFactroy _of = new OraMetaDataQueryFactroy();

            return(_of.SaveGuideLineParamSetting(_paramSetting, _paramters));
        }