Example #1
0
        public ExpandoObject MYPS55(
            int PI_1I,
            int PI_2I,
            string PI_3S,
            string PI_4S,
            string PI_5S
            )
        {
            try
            {
                // Data Validations

                using (TestBLL tbl = new TestBLL())
                {
                    return(tbl.Test_MYPS55(
                               PI_1I,
                               PI_2I,
                               PI_3S,
                               PI_4S,
                               PI_5S
                               ));
                }
            }
            catch (Exception ex)
            {
                // Exceptions Handler
                throw new Exception("Errorn Ma : " + ex.Message);
            }
        }
Example #2
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         ImageButton imgEdit = (ImageButton)sender;
         GridViewRow row     = (GridViewRow)imgEdit.NamingContainer;
         string      id      = Convert.ToString(row.Cells[0].Text);
         Session["T_Id"] = Convert.ToInt32(id);
         DataTable tblEmp = new TestBLL().SelectTestParaForEdit(id);
         if (tblEmp.Rows.Count > 0)
         {
             txtParaName.Text = Convert.ToString(tblEmp.Rows[0]["ParaName"]);
             txtMinPara.Text  = Convert.ToString(tblEmp.Rows[0]["MinPara"]);
             txtMaxPara.Text  = Convert.ToString(tblEmp.Rows[0]["MaxPara"]);
             ListItem item = ddlTestName.Items.FindByText(Convert.ToString(tblEmp.Rows[0]["TestName"]));
             ddlTestName.SelectedValue = item.Value;
             GetTestsWithPara();
             btnUpdate.Visible = true;
             BtnSave.Visible   = false;
             MultiView1.SetActiveView(View2);
         }
     }
     catch (Exception ex)
     {
         lblMessage.Text = ex.Message;
     }
 }
        private void testOlustur_btn_Click(object sender, EventArgs e)
        {
            sesCalmaClassBLL.PlayClickSound();
            ns1.BunifuThinButton2 testOlustur_btn = sender as ns1.BunifuThinButton2;
            TestEkleUC            testEkleUC      = testOlustur_btn.Parent as TestEkleUC;

            int sinavSuresi = 0;

            if (testEkleUC.sinavIsim_txt.Visible)
            {
                sinavSuresi = Convert.ToInt32(testEkleUC.sinavSure_txt.Text);
            }

            int konuSecme_cmb_SelectedValue = Convert.ToInt32(testEkleUC.konuSecme_cmb.SelectedValue);


            soruBLL = new SoruBLL();

            if (testEkleUC.sinavIsim_txt.Visible)
            {
                testBLL = new TestBLL()
                {
                    Isim = testEkleUC.sinavIsim_txt.Text, KonuId = (int)testEkleUC.konuSecme_cmb.SelectedValue, Sure = sinavSuresi, SoruSayisi = testEkleUC.eklenenSorular_flwpnl.Controls.Count
                }
            }
            ;

            else
            {
                testBLL = new TestBLL()
                {
                    Isim = testEkleUC.konuSecme_cmb.SelectedText + " - Konu Kavrama Testi - ", KonuId = (int)testEkleUC.konuSecme_cmb.SelectedValue, Sure = sinavSuresi, SoruSayisi = testEkleUC.eklenenSorular_flwpnl.Controls.Count
                }
            };

            bool islemBasariliMi = testBLL.AddData();

            foreach (EklenenSoruUC soru in testEkleUC.eklenenSorular_flwpnl.Controls)
            {
                soruBLL.Icerik              = soru.Icerik;
                soruBLL.SinavId             = testBLL.Id;
                soruBLL.KonuId              = soru.KonuId;
                soruBLL.GuncellenecekSoruId = soruBLL.GetDataByExpression(x => x.Soru_SinavId == soru.SinavId && x.Soru_KonuId == soru.KonuId && x.Soru_Icerik == soru.Icerik).Id;
                islemBasariliMi             = soruBLL.UpdateData();
            }

            if (islemBasariliMi)
            {
                islemSureci_tslbl.Text = "Test ekleme işlemi başarılı";
            }
            else
            {
                islemSureci_tslbl.Text = "Test ekleme işlemi başarısız tekrar deneyin";
            }
        }
Example #4
0
        protected void btnExcel_Click(object sender, EventArgs e)
        {
            TestBLL test = new TestBLL();

            DateTime  dt      = Convert.ToDateTime("24/06/2013");
            DataTable dtExcel = new DataTable();

            dtExcel = test.GetTypeWiseStockSummary("1", "1", dt);

            ExporttoExcel(dtExcel);
        }
Example #5
0
        public Form2()
        {
            InitializeComponent();
            _testBLL = new  TestBLL();

            lbStu.DataSource    = _testBLL.GetAllStudents().Select(x => x.StuNo).ToList();
            lbStu.SelectedIndex = -1;

            lbRoom.DataSource    = _testBLL.GetAllRooms().Select(x => x.Name).ToList();
            lbRoom.SelectedIndex = -1;

            lbStuRoom.SelectedIndex = -1;
        }
Example #6
0
 public IEnumerable <dept> GetData(
     string T_NAME
     )
 {
     try
     {
         using (TestBLL tbl = new TestBLL())
         {
             return(tbl.GetDeptHelper(
                        T_NAME
                        ));
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Errorn Ma : " + ex.Message);
     }
 }
        private void BindTests()
        {
            DataTable ldtShift = new TestBLL().GetAllTest();

            if (ldtShift.Rows.Count > 0)
            {
                dgvAllTests.DataSource = ldtShift;
                dgvAllTests.DataBind();
                Session["DepartmentDetail"] = ldtShift;
                int lintRowcount = ldtShift.Rows.Count;
                //lblRowCount.Text = "<b>Total Records:</b> " + lintRowcount.ToString();
                pnlShow.Style.Add(HtmlTextWriterStyle.Display, "");
                hdnPanel.Value = "";
            }
            else
            {
                hdnPanel.Value = "none";
            }
        }
Example #8
0
        public XElement CH_P_ESTBLSH_REG_INFO(
            int P_REG_ID
            )
        {
            try
            {
                /// Data Validations

                //if (String.IsNullOrEmpty(PI_1I))

                //throw new FaultException<ValidationFault>(new ValidationFault());

                using (TestBLL tbl = new TestBLL())
                {
                    return(tbl.CH_P_ESTBLSH_REG_INFO(
                               P_REG_ID
                               ));
                }
            }
            catch (FaultException <ValidationFault> e)
            {
                ValidationFault fault = new ValidationFault
                {
                    Result      = true,
                    Message     = "Parameter not correct",
                    Description = "Invalid Parameter Name or All Parameters are nullu"
                };

                throw new FaultException <ValidationFault>(
                          fault);
            }
            catch (Exception ex)
            {
                ValidationFault fault = new ValidationFault
                {
                    Result      = false,
                    Message     = ex.Message,
                    Description = "Service have an internal error please contact service administartor [email protected]"
                };

                throw new FaultException <ValidationFault>(fault);
            }
        }
Example #9
0
 public R_View GetSP(
     int dept_no,
     string dept_sec_name
     )
 {
     try
     {
         using (TestBLL tbl = new TestBLL())
         {
             return(tbl.GetSP(
                        dept_no,
                        dept_sec_name
                        ));
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Errorn Ma : " + ex.Message);
     }
 }
Example #10
0
        private void BindTestName()
        {
            try
            {
                DataTable tblCat = new TestBLL().GetAllTest();
                DataRow   dr     = tblCat.NewRow();
                dr["TestId"]   = 0;
                dr["TestName"] = "---Select---";
                tblCat.Rows.InsertAt(dr, 0);

                ddlTestName.DataSource     = tblCat;
                ddlTestName.DataValueField = "TestId";
                ddlTestName.DataTextField  = "TestName";
                ddlTestName.DataBind();
            }
            catch (Exception ex)
            {
                //  lblMessage.Text = ex.Message;
            }
        }
Example #11
0
        public ExpandoObject Test_MYPS55_2(
            int PI_1I
            )
        {
            try
            {
                // Data Validations

                using (TestBLL tbl = new TestBLL())
                {
                    return(tbl.Test_MYPS55_2(
                               PI_1I
                               ));
                }
            }
            catch (Exception ex)
            {
                // Exceptions Handler
                throw new Exception("Errorn Ma : " + ex.Message);
            }
        }
        private void ismeGoreSecme_txt_TextChanged(object sender, EventArgs e)
        {
            soruBLL    = new SoruBLL();
            testBLL    = new TestBLL();
            secenekBLL = new SecenekBLL();
            ListelenenSoru_btn button;
            int sayac = 1;

            secenekler_flwpnl.Visible        = true;
            listelenenSorular_flwpnl.Visible = true;
            soruIcerik_txt.Visible           = true;

            listelenenSorular_flwpnl.Controls.Clear();
            foreach (var test in testBLL.GetAllByExpression(x => x.Sinav_Ismi.Contains(ismeGoreSorgulama_txt.Text)))
            {
                foreach (var soru in soruBLL.GetAllByExpression(x => x.Soru_SinavId == test.Id))
                {
                    button                = new ListelenenSoru_btn();
                    button.SoruIcerik     = soru.Soru_Icerik;
                    button.SoruSecenekler = new List <string>();
                    button.SoruId         = soru.Id;
                    foreach (var secenek in secenekBLL.GetAllByExpression(x => x.Secenek_SoruId == soru.Id))
                    {
                        button.SoruSecenekler.Add(secenek.Secenek_Ismi + " ) " + secenek.Secenek_Icerik);
                    }
                    button.Text = testBLL.GetDataByExpression(x => x.Id == soru.Soru_SinavId).Sinav_Ismi + " - " + sayac.ToString() + ". Soru";
                    button.Size = new Size(185, 100);
                    button.FlatAppearance.BorderSize = 2;
                    button.FlatStyle = FlatStyle.Flat;
                    button.Click    += new EventHandler(listelenenSoru_btn_Click);
                    button.FlatAppearance.BorderColor = Color.FromArgb(150, 150, 150);
                    button.BackColor = Color.FromArgb(0, 133, 181);
                    button.ForeColor = Color.Silver;
                    button.Font      = konuSecme_cmb.Font;
                    listelenenSorular_flwpnl.Controls.Add(button);
                    sayac++;
                }
                sayac = 1;
            }
        }
        private void konuyaGoreSorgulama_cmb_SelectedIndexChanged(object sender, EventArgs e)
        {
            soruBLL    = new SoruBLL();
            testBLL    = new TestBLL();
            secenekBLL = new SecenekBLL();
            ListelenenSoru_btn button;
            short sayac = 1;

            secenekler_flwpnl.Visible        = true;
            listelenenSorular_flwpnl.Visible = true;
            soruIcerik_txt.Visible           = true;

            listelenenSorular_flwpnl.Controls.Clear();
            foreach (var soru in soruBLL.GetAllByExpression(x => x.Soru_KonuId == (int)konuyaGoreSorgulama_cmb.SelectedValue))
            {
                button                = new ListelenenSoru_btn();
                button.SoruIcerik     = soru.Soru_Icerik;
                button.SoruSecenekler = new List <string>();
                button.SoruId         = soru.Id;
                foreach (var secenek in secenekBLL.GetAllByExpression(x => x.Secenek_SoruId == soru.Id))
                {
                    button.SoruSecenekler.Add(secenek.Secenek_Ismi + " ) " + secenek.Secenek_Icerik);
                }
                button.Text = testBLL.GetDataByExpression(x => x.Id == soru.Soru_SinavId).Sinav_Ismi + " " + sayac.ToString() + ". Soru";
                button.Size = new Size(190, 60);
                button.FlatAppearance.BorderSize = 2;
                button.FlatStyle = FlatStyle.Flat;
                button.Click    += new EventHandler(listelenenSoru_btn_Click);
                button.FlatAppearance.BorderColor = Color.FromArgb(150, 150, 150);
                button.BackColor = sorgulamaCümlesi_lbl.ForeColor;
                button.ForeColor = Color.Silver;
                button.Font      = konuyaGoreSorgulama_cmb.Font;
                listelenenSorular_flwpnl.Controls.Add(button);
                sayac++;
            }
            sayac = 1;
        }
Example #14
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'ingilizcePerformansVeritabaniDataSet.Konular' table. You can move, or remove it, as needed.
            //this.konularTableAdapter.Fill(this.ingilizcePerformansVeritabaniDataSet.Konular);

            /*SinifBLL sinifBLL = new SinifBLL();
             * sinifBLL.SilinecekSinifId = 18;
             * sinifBLL.DeleteData();*/

            TestBLL testBLL = new TestBLL();

            testBLL.GuncellenecekTestId = 22;
            testBLL.SoruSayisi          = 1;
            testBLL.TestCozulduMu       = true;
            testBLL.UpdateData();

            foreach (Button button in flowLayoutPanel1.Controls)
            {
                if (button.Name == "buton")
                {
                    button.ForeColor = Color.Green;
                }
            }
        }
Example #15
0
        public XElement Test_MYPS55_4(
            int PI_1I
            )
        {
            try
            {
                // Data Validations
                if (true)
                {
                }

                using (TestBLL tbl = new TestBLL())
                {
                    return(tbl.Test_MYPS55_4(
                               PI_1I
                               ));
                }
            }
            catch (Exception ex)
            {
                // Exceptions Handler
                throw new Exception("Errorn Ma : " + ex.Message);
            }
        }
Example #16
0
        public object FunctionTest(string type)
        {
            TestBLL testBLL = new TestBLL();

            return(testBLL.FunctionTest(type));
        }
Example #17
0
 public HomeController(TestBLL testBLL)
 {
     this.testBLL = testBLL;
 }
Example #18
0
 /// <summary>
 /// 建構函式
 /// </summary>
 /// <param name="resultModel">回傳格式</param>
 /// <param name="settings">Configuration設定檔</param>
 public TestController(ResultModel resultModel, TestBLL testBLL)
 {
     this.resultModel = resultModel;
     this.testBLL     = testBLL;
 }