public void adddata(string __fname)
        {
            //get candidate first name, last name etc from db.
            var cclid = new DlCandidates();
            string[] temphldoldcan = cclid.Getcandidatesindb(Session["pusername"].ToString());

            if (temphldoldcan.Length > 0)
            {
                //add max count
                var cc = new ClCodeconverter();
                int __pcount = cc.Getmaxfile(pathsetter);

                //upload to server
                FileUpload1.SaveAs(Server.MapPath(pathsetter) + __pcount + __fname);

                var app = new DlApps();

                //apps add
                int mxdocid = app.Getmaxdocid();
                int mxappid = app.Getmaxappid();

                var cinf = new CultureInfo("en-GB");
                string dobdate1 = temphldoldcan[3];

                //fill in app. automatically
                app.AddApplicationcan(Convert.ToInt32(temphldoldcan[4]), temphldoldcan[0], temphldoldcan[1], dobdate1,
                                      TextBox2.Text, mxdocid, Session["pusername"].ToString());
                app.AddApplicationMapping(Convert.ToInt16(Request.QueryString["JobID"]), mxappid);
                app.Adddocuments(__pcount + __fname, pathsetter + __pcount + __fname);
            }
        }
Exemplo n.º 2
0
        private void Adddata(string __filename)
        {
            //set culture to british
            //modify here in future if this needs to be set to us formats
            //edited by adam

            var      cinf     = new CultureInfo("en-GB");
            DateTime dobsdate = Convert.ToDateTime(TextBox5.Text, cinf);

            string dobdate1 = dobsdate.ToString("MM/dd/yyyy");

            //add max count
            var cc       = new ClCodeconverter();
            int __pcount = cc.Getmaxfile(Server.MapPath(pathsetter));

            FileUpload1.SaveAs(Server.MapPath(pathsetter) + __pcount + __filename);

            var app = new DlApps();

            //apps add
            int mxdocid = app.Getmaxdocid();
            int mxappid = app.Getmaxappid();

            app.AddApplication(TextBox3.Text, TextBox4.Text, dobdate1, TextBox2.Text, mxdocid, TextBox6.Text);
            app.AddApplicationMapping(Convert.ToInt16(Request.QueryString["JobID"]), mxappid);
            app.Adddocuments(__pcount + __filename, pathsetter + __pcount + __filename);
        }
Exemplo n.º 3
0
        public void adddata(string __fname)
        {
            //get candidate first name, last name etc from db.
            var cclid = new DlCandidates();

            string[] temphldoldcan = cclid.Getcandidatesindb(Session["pusername"].ToString());

            if (temphldoldcan.Length > 0)
            {
                //add max count
                var cc       = new ClCodeconverter();
                int __pcount = cc.Getmaxfile(pathsetter);

                //upload to server
                FileUpload1.SaveAs(Server.MapPath(pathsetter) + __pcount + __fname);

                var app = new DlApps();

                //apps add
                int mxdocid = app.Getmaxdocid();
                int mxappid = app.Getmaxappid();

                var    cinf     = new CultureInfo("en-GB");
                string dobdate1 = temphldoldcan[3];

                //fill in app. automatically
                app.AddApplicationcan(Convert.ToInt32(temphldoldcan[4]), temphldoldcan[0], temphldoldcan[1], dobdate1,
                                      TextBox2.Text, mxdocid, Session["pusername"].ToString());
                app.AddApplicationMapping(Convert.ToInt16(Request.QueryString["JobID"]), mxappid);
                app.Adddocuments(__pcount + __fname, pathsetter + __pcount + __fname);
            }
        }
Exemplo n.º 4
0
        private void Adddata(string __filename)
        {
            //set culture to british
            //modify here in future if this needs to be set to us formats
            //edited by adam

            var cinf = new CultureInfo("en-GB");
            DateTime dobsdate = Convert.ToDateTime(TextBox5.Text, cinf);

            string dobdate1 = dobsdate.ToString("MM/dd/yyyy");

            //add max count
            var cc = new ClCodeconverter();
            int __pcount = cc.Getmaxfile(Server.MapPath(pathsetter));
            FileUpload1.SaveAs(Server.MapPath(pathsetter) + __pcount + __filename);

            var app = new DlApps();

            //apps add
            int mxdocid = app.Getmaxdocid();
            int mxappid = app.Getmaxappid();

            app.AddApplication(TextBox3.Text, TextBox4.Text, dobdate1, TextBox2.Text, mxdocid, TextBox6.Text);
            app.AddApplicationMapping(Convert.ToInt16(Request.QueryString["JobID"]), mxappid);
            app.Adddocuments(__pcount + __filename, pathsetter + __pcount + __filename);
        }