private void FrmReports_Load(object sender, EventArgs e)
        {
            btnPrepare.Enabled     = false;
            btnAlternative.Enabled = false;
            btnStore.Enabled       = false;
            btnReport.Enabled      = false;
            cbAcedemicYear.Items.Clear();
            foreach (DataRow r in DbProcess.GetSemesters().Rows)
            {
                ComboboxItem c = new ComboboxItem {
                    Value = r["id"].ToString(), Text = r["semester"].ToString()
                };
                cbAcedemicYear.Items.Add(c);
            }
            foreach (DataRow r in DbProcess.GetDepartments().Rows)
            {
                ComboboxItem c = new ComboboxItem {
                    Value = r["DepID"].ToString(), Text = r["Department"].ToString()
                };
                cbDept.Items.Add(c);
            }

            DataGridViewImageColumn dim = new DataGridViewImageColumn();

            dim.Image = Properties.Resources.deles;

            dataGridView1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["yetki"] != "yönetici")
     {
         Response.Redirect("../../Login Sayfası/login.aspx");
     }
     if (!IsPostBack)
     {    //default olarak eklenen özelliklerini getirir
         DbProcess          dbProcess   = new DbProcess();
         Oteller            oteller     = new Oteller();
         OtelOzellik        otelOzellik = new OtelOzellik(oteller);
         List <OtelOzellik> liste       = new List <OtelOzellik>();
         liste                       = dbProcess.OtelOzellikSelect();
         otelOzellik                 = liste[0];
         chkFitness.Checked          = otelOzellik.fitness;
         chkInternetErisim.Checked   = otelOzellik.internetErisimi;
         chkOdaServisi.Checked       = otelOzellik.internetErisimi;
         chkRestoran.Checked         = otelOzellik.restoran;
         chkYuzmeHavuzu.Checked      = otelOzellik.yuzmeHavuzu;
         chkSaglikMerkezi.Checked    = otelOzellik.saglikMerkezi;
         chkCocukTesisleri.Checked   = otelOzellik.cocukTesisleri;
         chkOtopark.Checked          = otelOzellik.otopark;
         chkToplantiOdasi.Checked    = otelOzellik.toplantiOdasi;
         chkEvcilHayvan.Checked      = otelOzellik.evcilHayvan;
         chkBar.Checked              = otelOzellik.bar;
         chkHavaalanıServisi.Checked = otelOzellik.havaalaniServisi;
         chkAcikBufeKahvalti.Checked = otelOzellik.acikBufeKahvalti;
     }
 }
        private void btnInsert_Click(object sender, EventArgs e)
        {
            int cId = int.Parse((cbCourses.SelectedItem as ComboboxItem).Value.ToString());

            DbProcess.ChapterInsert(cId, int.Parse(txtChapterNo.Value.ToString()), txtChapter.Text);
            RefreshGrid();
        }
Esempio n. 4
0
    protected void btnOtelKur_Click(object sender, EventArgs e)//otel girilen özelliklere göre update edilir
    {
        DbProcess   dbProcess   = new DbProcess();
        Oteller     oteller     = new Oteller();
        OtelOzellik otelOzellik = new OtelOzellik(oteller)
        {
            otelID           = 1,
            fitness          = Convert.ToBoolean(chkFitness.Checked),
            internetErisimi  = Convert.ToBoolean(chkInternetErisim.Checked),
            odaServisi       = Convert.ToBoolean(chkOdaServisi.Checked),
            restoran         = Convert.ToBoolean(chkRestoran.Checked),
            yuzmeHavuzu      = Convert.ToBoolean(chkYuzmeHavuzu.Checked),
            saglikMerkezi    = Convert.ToBoolean(chkSaglikMerkezi.Checked),
            cocukTesisleri   = Convert.ToBoolean(chkCocukTesisleri.Checked),
            otopark          = Convert.ToBoolean(chkOtopark.Checked),
            toplantiOdasi    = Convert.ToBoolean(chkToplantiOdasi.Checked),
            evcilHayvan      = Convert.ToBoolean(chkEvcilHayvan.Checked),
            bar              = Convert.ToBoolean(chkBar.Checked),
            havaalaniServisi = Convert.ToBoolean(chkHavaalanıServisi.Checked),
            acikBufeKahvalti = Convert.ToBoolean(chkAcikBufeKahvalti.Checked)
        };

        dbProcess.OtelOzellikUpdate(otelOzellik);


        HtmlMeta meta = new HtmlMeta();

        meta.HttpEquiv = "Refresh";
        meta.Content   = "2;url=otelKur.aspx";
        this.Page.Controls.Add(meta);
        lblOnay.Visible = true;
        lblOnay.Text    = "İşleminiz tamamlandı , 2 saniye sonra yönlendirileceksiniz.";
    }
        public FrmPersonelsCourses()
        {
            InitializeComponent();

            foreach (DataRow r in DbProcess.GetSemesters().Rows)
            {
                ComboboxItem c = new ComboboxItem {
                    Value = r["id"].ToString(), Text = r["semester"].ToString()
                };
                cbSemester.Items.Add(c);
            }

            foreach (DataRow r in DbProcess.GetPersonelsWithFullName().Rows)
            {
                ComboboxItem c = new ComboboxItem {
                    Value = r["id"].ToString(), Text = r["FullName"].ToString()
                };
                cbPersonels.Items.Add(c);
            }

            foreach (DataRow r in DbProcess.GetDepartments().Rows)
            {
                ComboboxItem c = new ComboboxItem {
                    Value = r["DepID"].ToString(), Text = r["Department"].ToString()
                };
                cbDepartments.Items.Add(c);
            }
            RefreshGrid();
        }
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            signingKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(Configuration["Keys:UserAuthSecretKey"]));
            tokenValidationParameters = new TokenValidationParameters
            {
                ValidateIssuerSigningKey = true,
                IssuerSigningKey         = signingKey,
                ValidIssuer      = Configuration["Keys:Issue"],
                ValidAudience    = Configuration["Keys:Audience"],
                ValidateLifetime = true
            };

            if (env.IsDevelopment())
            {
                app.UseExceptionHandler("/Home/Error");
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            DbProcess.CallSeed(Configuration,
                               app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope().ServiceProvider);

            app.UseAuthentication();
            app.UseHttpsRedirection();
            app.UseMvc();
        }
        private void btnReport_Click(object sender, EventArgs e)
        {
            btnStore.Enabled = true;
            if (cbCourse.Text == "")
            {
                MessageBox.Show("blank fields !!!");
            }
            else
            {
                DataBand       d1             = null;
                DataBand       d2             = null;
                DataSourceBase parentDs       = null;
                DataSourceBase childDs        = null;
                DataSourceBase customersTable = null;
                DataSourceBase ordersTable    = null;
                Relation       rel            = null;
                report.Dictionary.Clear();

                DataTable dt = dataGridView1.DataSource as DataTable;

                DataView view = new DataView(dt);
                view.RowFilter = "Ch = 1";


                dt = view.ToTable();


                report.RegisterData(dt, "ShowQuestions");
                report.RegisterData(DbProcess.ShowAnswer(), "ShowAnswer");
                report.SetParameterValue("mypara", textBox1.Text);
                //report.SetParameterValue("depar", cbDepartmanlar.Text);
                report.SetParameterValue("course", cbCourse.Text);
                report.SetParameterValue("smester", cbAcedemicYear.Text);
                report.SetParameterValue("exam", comboBox4.Text);
                parentDs         = report.GetDataSource("ShowQuestions");
                childDs          = report.GetDataSource("ShowAnswer");
                parentDs.Enabled = true;
                childDs.Enabled  = true;
                customersTable   = report.Dictionary.DataSources.FindByAlias("ShowQuestions");
                ordersTable      = report.Dictionary.DataSources.FindByAlias("ShowAnswer");
                rel                  = new Relation();
                rel.Name             = "customersOrders";
                rel.ParentDataSource = customersTable;
                rel.ChildDataSource  = ordersTable;
                rel.ParentColumns    = new string[] { "Id" };
                rel.ChildColumns     = new string[] { "QuestionId" };
                report.Dictionary.Relations.Add(rel);
                report.Dictionary.UpdateRelations();
                d1            = report.FindObject("Data1") as DataBand;
                d1.DataSource = parentDs;
                d2            = report.FindObject("Data2") as DataBand;
                d2.DataSource = childDs;
                report.Show();
            }
        }
        private void RefreshGrid()
        {
            int pId = 0;

            try
            {
                pId = int.Parse((cbPersonels.SelectedItem as ComboboxItem).Value.ToString());
            }
            catch (Exception) { }
            dataGridView1.DataSource = DbProcess.PersonelsCoursesList(pId);
        }
 public FrmChapters()
 {
     InitializeComponent();
     foreach (DataRow r in DbProcess.GetDepartments().Rows)
     {
         ComboboxItem c = new ComboboxItem {
             Value = r["DepID"].ToString(), Text = r["Department"].ToString()
         };
         cbDepartments.Items.Add(c);
     }
 }
        private void button5_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                return;
            }
            int id = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());

            DbProcess.ExamPaperss(id);
            dataGridView1.DataSource = DbProcess.ExamPapers(this.frm1.PersonelId);
        }
Esempio n. 11
0
    private IEnumerator getRanking()
    {
        DbProcess obj = gameObject.AddComponent <DbProcess>();
        var       dic = new Dictionary <string, string>();

        obj.Dic = dic;

        obj.ServerAddress = "http://shigotoyo.starfree.jp/solution_comunity/getRanking.php";

        yield return(StartCoroutine(obj.process(obj.Dic, obj.ServerAddress)));
    }
        private void RefreshGrid()
        {
            int cId = 0;

            try
            {
                cId = int.Parse((cbCourses.SelectedItem as ComboboxItem).Value.ToString());
            }
            catch (Exception) { }
            dataGridView1.DataSource = DbProcess.ChapterList(cId);
        }
        private void button5_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                return;
            }
            int id = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());

            DbProcess.ChapterDelete(id);
            RefreshGrid();
        }
    private IEnumerator register()
    {
        DbProcess obj = gameObject.AddComponent <DbProcess>();
        var       dic = new Dictionary <string, string>();

        dic.Add("name", userName.text);

        obj.Dic = dic;

        obj.ServerAddress = "http://shigotoyo.starfree.jp/solution_comunity/account_verification.php";

        yield return(StartCoroutine(obj.process(obj.Dic, obj.ServerAddress)));
    }
        private void cbDepartments_SelectedIndexChanged(object sender, EventArgs e)
        {
            cbCourses.Items.Clear();
            int deptId = int.Parse((cbDepartments.SelectedItem as ComboboxItem).Value.ToString());

            foreach (DataRow r in DbProcess.GetCoursesWithDeptId(deptId).Rows)
            {
                ComboboxItem c = new ComboboxItem {
                    Value = r["courseid"].ToString(), Text = r["course"].ToString()
                };
                cbCourses.Items.Add(c);
            }
        }
Esempio n. 16
0
    private IEnumerator getTalkList()
    {
        DbProcess obj = gameObject.AddComponent <DbProcess>();
        var       dic = new Dictionary <string, string>();

        dic.Add("me_id", login.userId);

        obj.Dic = dic;

        obj.ServerAddress = "http://shigotoyo.starfree.jp/solution_comunity/getTalkCatalog.php";

        yield return(StartCoroutine(obj.process(obj.Dic, obj.ServerAddress)));
    }
    private IEnumerator getPass()
    {
        var ins = new DbProcess();

        var dic = new Dictionary <string, string>();

        dic.Add("name", userName.text);
        ins.Dic = dic;

        ins.ServerAddress = "http://shigotoyo.starfree.jp/solution_comunity/login.php";
        var obj = gameObject.AddComponent <DbProcess>();

        yield return(StartCoroutine(obj.process(ins.Dic, ins.ServerAddress)));
    }
Esempio n. 18
0
    private IEnumerator registerSolution()
    {
        DbProcess obj = gameObject.AddComponent <DbProcess>();
        var       dic = new Dictionary <string, string>();

        dic.Add("solution_id", common.solution_id);
        dic.Add("user_id", login.userId);

        obj.Dic = dic;

        obj.ServerAddress = "http://shigotoyo.starfree.jp/solution_comunity/getSolutionDetail.php";

        yield return(StartCoroutine(obj.process(obj.Dic, obj.ServerAddress)));
    }
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     if (cbSemester.Text == "" || cbPersonels.Text == "" || cbDepartments.Text == "" || cbCourses.Text == "")
     {
         MessageBox.Show("Please choose Course than Fill in the blanks!");
     }
     else
     {
         int id         = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());
         int semesterId = int.Parse((cbSemester.SelectedItem as ComboboxItem).Value.ToString());
         int courseId   = int.Parse((cbCourses.SelectedItem as ComboboxItem).Value.ToString());
         DbProcess.PersonelCoursesUpdate(id, semesterId, courseId);
         RefreshGrid();
     }
 }
 private void btnInsert_Click(object sender, EventArgs e)
 {
     if (cbSemester.Text == "" || cbPersonels.Text == "" || cbDepartments.Text == "" || cbCourses.Text == "")
     {
         MessageBox.Show("Please Fill in the blanks!");
     }
     else
     {
         int semesterId = int.Parse((cbSemester.SelectedItem as ComboboxItem).Value.ToString());
         int personelId = int.Parse((cbPersonels.SelectedItem as ComboboxItem).Value.ToString());
         int courseId   = int.Parse((cbCourses.SelectedItem as ComboboxItem).Value.ToString());
         DbProcess.PersonelCoursesInsert(semesterId, personelId, courseId);
         RefreshGrid();
     }
 }
    private IEnumerator register()
    {
        DbProcess obj = gameObject.AddComponent <DbProcess>();
        var       dic = new Dictionary <string, string>();

        dic.Add("user_id", login.userId);
        dic.Add("title", postInput.title);
        dic.Add("content", postInput.solution);

        obj.Dic = dic;

        obj.ServerAddress = "http://shigotoyo.starfree.jp/solution_comunity/registerContent.php";

        yield return(StartCoroutine(obj.process(obj.Dic, obj.ServerAddress)));
    }
Esempio n. 22
0
        public String continueMusic(String teamName, String musicName)
        {
            DbProcess msd = new DbProcess(teamName);

            if (msd.getTeam())
            {// true为已存在
             // 获取音乐播放状态
                msd.setSyncIdFromTeamName(teamName);
                return(msd.continueMusic());
            }
            else
            {
                return("Team not found");
            }
        }
        private void cbCourse_SelectedIndexChanged(object sender, EventArgs e)
        {
            cbChapter.Items.Clear();
            int cItem = int.Parse(((ComboboxItem)cbCourse.SelectedItem).Value.ToString());

            foreach (DataRow r in DbProcess.ChapterList(cItem).Rows)
            {
                ComboboxItem c = new ComboboxItem
                {
                    Text  = r["ChapterName"].ToString(),
                    Value = r["Id"].ToString()
                };
                cbChapter.Items.Add(c);
            }
        }
Esempio n. 24
0
        public string getSynTime(String teamName, String musicName)
        {
            //return "::"+ teamName+"++"+musicName;
            string result = "ss";

            try
            {
                DbProcess msd = new DbProcess(teamName);
                // 验证是否已存在某条舞团播放信息
                if (msd.getTeam())
                {// true为已存在
                 // 获取音乐播放状态
                    msd.setSyncIdFromTeamName(teamName);
                    if (msd.getMusicState() == 1)
                    {                                         // 1-播放中;0-暂停;-1-默认状态
                     // 获取音乐开始播放日期时间
                        DateTime ts = msd.getStartDateTime(); // 开始播放的日期时间
                        long     s  = StringProcess.ConvertDataTimeLong(DateTime.Now) - StringProcess.ConvertDataTimeLong(ts);

                        return("" + s);//播放进度
                    }
                    else if (msd.getMusicState() == 0)
                    {
                        long s = msd.getPauseTime();
                        return("" + -1);//"已在"+s+"毫秒处暂停";
                    }
                    else
                    {
                        return("" + -2);//"播放状态错误";
                    }
                }
                else
                {
                    // 添加
                    System.Diagnostics.Debug.Write(msd.getTeam());
                    if (msd.addNewMusic(musicName))
                    {
                        return("" + 0); //"已添加成功";
                    }
                    return("" + -3);    //"添加失败";
                }
            }
            catch (Exception e)
            {
                result = 2017 + e.ToString();
            }
            return(result);
        }
 private void button5_Click(object sender, EventArgs e)
 {
     if (cbSemester.Text == "" || cbPersonels.Text == "")
     {
         MessageBox.Show("Please choose course!");
     }
     else
     {
         if (dataGridView1.SelectedRows.Count == 0)
         {
             return;
         }
         int id = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());
         DbProcess.PersonelCoursesDelete(id);
         RefreshGrid();
     }
 }
Esempio n. 26
0
        public string Process(string scanResult)
        {
            DbProcess dbProcess = new DbProcess(_configs.Value.oldcon, _configs.Value.newCon);
            var       dic       = dbProcess.Process(scanResult);
            var       res       = "";

            if (dic.Count > 0 && !String.IsNullOrEmpty(dic["Name"]))
            {
                res = JFPrintTemplate.GetDisplayString(dic["Barcode"], dic["chandi"], Convert.ToInt32(dic["CheckCount"]), dic["Name"], dic["Code"]);
            }
            else
            {
                res = "尊敬的用户,您好! 该产品不属于晚安生产的产品,请谨防假冒.(注:防伪验证支持湖南床垫2015年9月1日(佛山床垫10月1日丶晚安软床10月1日)/晚安家纺(2016年8月15日)之后生产贴标的产品!)";
            }


            return(res);
        }
    private IEnumerator commentPost()
    {
        DbProcess obj = gameObject.AddComponent <DbProcess>();
        var       dic = new Dictionary <string, string>();

        dic.Add("solution_id", common.solution_id);
        dic.Add("user_id", login.userId);
        dic.Add("comment", commentInput.text);

        obj.Dic = dic;

        obj.ServerAddress = "http://shigotoyo.starfree.jp/solution_comunity/commentPost.php";

        yield return(StartCoroutine(obj.process(obj.Dic, obj.ServerAddress)));

        commentPanel.gameObject.SetActive(false);
        SceneManager.LoadScene("solution");
    }
        private void cbAcedemicYear_SelectedIndexChanged(object sender, EventArgs e)
        {
            cbCourse.Items.Clear();
            int sItem = int.Parse(((ComboboxItem)cbAcedemicYear.SelectedItem).Value.ToString());

            foreach (DataRow r in DbProcess.PersonelCourseList1(frm1.PersonelId, sItem).Rows)
            {
                ComboboxItem item = new ComboboxItem
                {
                    Text  = r["course"].ToString(),
                    Value = r["CourseId"].ToString()
                };
                cbCourse.Items.Add(item);
            }
            if (cbCourse.SelectedIndex != -1)
            {
                cbCourse.SelectedIndex = 0;
            }
        }
        private void btnStore_Click(object sender, EventArgs e)
        {
            FastReport.Export.Pdf.PDFExport pdfExport = new FastReport.Export.Pdf.PDFExport();
            pdfExport.ShowProgress   = true;
            pdfExport.Subject        = "Subject";
            pdfExport.Title          = "Exam";
            pdfExport.Compressed     = true;
            pdfExport.AllowPrint     = true;
            pdfExport.EmbeddingFonts = true;
            MemoryStream strm = new MemoryStream();

            report.Prepare();
            report.Export(pdfExport, strm);
            byte[] b     = strm.ToArray();
            string title = Microsoft.VisualBasic.Interaction.InputBox("Exam Paper Title", "Save Exam Paper", (cbAcedemicYear.Text) + (cbCourse.Text) + (comboBox4.Text));

            DbProcess.ExamPapersInsert(frm1.PersonelId, title, b);
            MessageBox.Show("Done.");
        }
Esempio n. 30
0
    protected void btnOtelEkle_Click(object sender, EventArgs e)//default özelliklerle otel ekler
    {
        Oteller otel = new Oteller()
        {
            ad           = txtad.Text,
            adres        = TextBox1.Text,
            fax          = TextBox2.Text,
            yildizSayisi = int.Parse(drpyildiz.SelectedValue)
        };

        db.OtellerInsert(otel);

        DbProcess   dbProcess   = new DbProcess();
        Oteller     oteller     = new Oteller();
        OtelOzellik otelOzellik = new OtelOzellik(oteller)
        {
            otelID           = 1,
            fitness          = false,
            internetErisimi  = false,
            odaServisi       = false,
            restoran         = false,
            yuzmeHavuzu      = false,
            saglikMerkezi    = false,
            cocukTesisleri   = false,
            otopark          = false,
            toplantiOdasi    = false,
            evcilHayvan      = false,
            bar              = false,
            havaalaniServisi = false,
            acikBufeKahvalti = false
        };

        dbProcess.OtelOzellikInsert(otelOzellik);

        HtmlMeta meta = new HtmlMeta();

        meta.HttpEquiv = "Refresh";
        meta.Content   = "2;url=otelEkle.aspx";
        this.Page.Controls.Add(meta);
        lblOnay.Visible = true;
        lblOnay.Text    = "İşleminiz tamamlandı , 2 saniye sonra yönlendirileceksiniz.";
    }