Пример #1
0
        public bool getallprocesses()
        {
            string s = "select * from fncGetAllCores() order by coreid";

            try
            {
                helper.hlpDbConnect1 db = new helper.hlpDbConnect1(clsglobal.cn);
                var allrows             = db.getmylist(s);
                if (allrows.Count > 0)
                {
                    foreach (shlpMyDictionary b in allrows)
                    {
                        int         i  = b.getint("coreid");
                        string      ds = b.getvalue("descript");
                        string      l  = b.getvalue("rootlnk");
                        coreprocess c  = new coreprocess(i, ds, l);
                        prs.Add(c);
                    }
                }
            }
            catch (Exception e)
            {
                msg = e.Message;
                return(false);
            }
            return(true);
        }
Пример #2
0
        // 1 is applied, 2 - dismissed
        public ActionResult updatejob(int jobid, int kind)
        {
            helper.hlpDbConnect1 db = new helper.hlpDbConnect1(clsglobal.cn);
            string s = "exec spUpdateJob '" + jobid + "', '" + kind + "'";
            int    i = db.getfirstint(s);

            return(RedirectToAction("startbrowsejobs"));
        }
Пример #3
0
        public static void clearcolorlist()
        {
            colorlist = new List <markinginfo>();
            string s = "exec spClearColor";

            helper.hlpDbConnect1 db = new helper.hlpDbConnect1(clsglobal.cn);
            int i = db.getfirstint(s);
        }
Пример #4
0
        public bool loadskills(int id)
        {
            string s = "select * from dbo.fncGetSkillsByGroupId('" + id + "') order by inresume desc";

            helper.hlpDbConnect1 db = new helper.hlpDbConnect1(clsglobal.cn);
            var allrows             = db.getmylist(s);

            if (allrows.Count > 0)
            {
                foreach (shlpMyDictionary b in allrows)
                {
                    string sk = b.getvalue("skill");
                    int    rs = b.getint("inresume");
                    skils.Add(sk, rs);
                }
            }
            return(true);
        }
Пример #5
0
        public bool getalljobs()
        {
            string s = "select * from dbo.fncJobsGetAll(1) order by rating  desc";

            try
            {
                helper.hlpDbConnect1 db = new helper.hlpDbConnect1(clsglobal.cn);
                var allrows             = db.getmylist(s);
                if (allrows.Count > 0)
                {
                    foreach (shlpMyDictionary b in allrows)
                    {
                        int    id        = b.getint("id");
                        string title     = b.getvalue("title");
                        string source    = "indeed";
                        string lnk       = b.getvalue("lnk");
                        string desc      = b.getvalue("descript");
                        string dt        = b.getvalue("postdate");
                        int    apl       = b.getint("applied");
                        string comp      = b.getvalue("company");
                        string loc       = b.getvalue("location");
                        int    dist      = b.getint("distance");
                        int    grskillid = b.getint("skillid");


                        onejob c = new onejob(id, title, dt, source,
                                              lnk, desc, apl, comp, loc, dist, grskillid);
                        jbs.Add(c);
                    }
                }
            }
            catch (Exception e)
            {
                msg = e.Message;
                return(false);
            }
            return(true);
        }
Пример #6
0
        public static int addcolor(int segidin, string lim,
                                   string col, string innercolorin, int lmseqin)
        {
            int         id = colorlist.Count + 1;
            markinginfo a  = new markinginfo()
            {
                segindex   = segidin,
                limit      = lim,
                color      = col,
                innercolor = innercolorin,
                limseq     = lmseqin
                             //id = id
            };

            addtocolorlist(a);
            // storing to db
            string s = "exec spStoreColor '" + segidin + "',  '" + lim +
                       "',  '" + col + "',  '" + innercolorin + "',  '" + lmseqin + "' ";

            helper.hlpDbConnect1 db = new helper.hlpDbConnect1(clsglobal.cn);
            int i = db.getfirstint(s);

            return(id);
        }