示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        BL_master Mehin = new BL_master();

        DataList10.DataSource = Mehin.cat10();
        DataList10.DataBind();

        DataList11.DataSource = Mehin.cat20();
        DataList11.DataBind();

        DataList12.DataSource = Mehin.cat30();
        DataList12.DataBind();
    }
    public void Load()
    {
        DataList3.DataSource = op.SelectImage("手机", 5);
        DataList3.DataBind();
        DataList4.DataSource = op.SelectImage("电器城", 5);
        DataList4.DataBind();
        DataList5.DataSource = op.SelectImage("西西超市", 5);
        DataList5.DataBind();
        DataList6.DataSource = op.SelectImage("西西生活", 5);
        DataList6.DataBind();
        DataList7.DataSource = op.SelectImage("有我你更美", 5);
        DataList7.DataBind();
        DataList8.DataSource = op.SelectImage("智能硬件", 5);
        DataList8.DataBind();

        midImage.DataSource = op.SelectImage("pimage", 5);
        midImage.DataBind();

        DataList9.DataSource = op.SelectImage("手机", 10);
        DataList9.DataBind();
        DataList10.DataSource = op.SelectImage("电器城", 10);
        DataList10.DataBind();
        DataList11.DataSource = op.SelectImage("西西超市", 10);
        DataList11.DataBind();
        DataList12.DataSource = op.SelectImage("西西生活", 10);
        DataList12.DataBind();
        DataList13.DataSource = op.SelectImage("智能硬件", 10);
        DataList13.DataBind();
        DataList14.DataSource = op.SelectImage("有我你更美", 10);
        DataList14.DataBind();
        DataList15.DataSource = op.SelectImage("办公设备", 10);
        DataList15.DataBind();
        DataList16.DataSource = op.SelectImage("西西商城", 10);
        DataList16.DataBind();

        DataList17.DataSource = op.SelectNewInfo(10);
        DataList17.DataBind();


        Phone.DataSource = op.SelectPhone(10);
        Phone.DataBind();

        Life.DataSource = op.SelectImage("西西生活", 10);
        Life.DataBind();

        Electric.DataSource = op.SelectImage("电器城", 10);
        Electric.DataBind();

        Beauty.DataSource = op.SelectImage("有我你更美", 10);
        Beauty.DataBind();
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\userside.mdf;Integrated Security=True;User Instance=True");

            string str;
            str = "select * from Screen_managment";


            SqlCommand cmd = new SqlCommand(str, con);

            con.Open();

            SqlDataReader dr;
            dr = cmd.ExecuteReader();

            DataList12.DataSource = dr;
            DataList12.DataBind();
        }
    }
示例#4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlCommand    komut = new SqlCommand("Select *From Tbl_Kategoriler ", bgl.baglanti());
            SqlDataReader oku   = komut.ExecuteReader();

            DataList1.DataSource = oku;
            DataList1.DataBind();

            SqlCommand    komutt = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=1 ", bgl.baglanti());
            SqlDataReader okuu   = komutt.ExecuteReader();

            DataList3.DataSource = okuu;
            DataList3.DataBind();

            SqlCommand    komut2 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=6 ", bgl.baglanti());
            SqlDataReader oku2   = komut2.ExecuteReader();

            DataList4.DataSource = oku2;
            DataList4.DataBind();

            SqlCommand    komut3 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=9 ", bgl.baglanti());
            SqlDataReader oku3   = komut3.ExecuteReader();

            DataList5.DataSource = oku3;
            DataList5.DataBind();

            SqlCommand    komut4 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=11 ", bgl.baglanti());
            SqlDataReader oku4   = komut4.ExecuteReader();

            DataList6.DataSource = oku4;
            DataList6.DataBind();

            SqlCommand    komut5 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=8 ", bgl.baglanti());
            SqlDataReader oku5   = komut5.ExecuteReader();

            DataList7.DataSource = oku5;
            DataList7.DataBind();

            SqlCommand    komut6 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=10 ", bgl.baglanti());
            SqlDataReader oku6   = komut6.ExecuteReader();

            DataList8.DataSource = oku6;
            DataList8.DataBind();

            SqlCommand    komut7 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=7 ", bgl.baglanti());
            SqlDataReader oku7   = komut7.ExecuteReader();

            DataList9.DataSource = oku7;
            DataList9.DataBind();

            SqlCommand    komut8 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=2 ", bgl.baglanti());
            SqlDataReader oku8   = komut8.ExecuteReader();

            DataList10.DataSource = oku8;
            DataList10.DataBind();

            SqlCommand    komut9 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=9 ", bgl.baglanti());
            SqlDataReader oku9   = komut9.ExecuteReader();

            DataList11.DataSource = oku9;
            DataList11.DataBind();

            SqlCommand    komut10 = new SqlCommand("Select *From Tbl_kahveler WHERE Kahveid=7 ", bgl.baglanti());
            SqlDataReader oku10   = komut10.ExecuteReader();

            DataList12.DataSource = oku10;
            DataList12.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            QueDao queDaoObj = new QueDao();

            if (Page.IsPostBack == false)
            {
                fillRelevanceScore(scoreTxtBx1, true);
                fillRelevanceScore(TextBox1, true);
                fillRelevanceScore(TextBox2, true);
                fillCLODropDown(Session["CourseID"].ToString());
                if (DropDownList3.SelectedItem != null)
                {
                    fillSODropDown(DropDownList3.SelectedItem.Value);
                    fillCourseTopicDropDownByCloId(DropDownList3.SelectedItem.Value);
                }

                String   value    = ClientQueryString;
                String[] valueArr = value.Split('=', '&');
                if (valueArr.Count() > 1)
                {
                    int  inputId    = Int32.Parse(valueArr[1]);
                    bool deleteMode = valueArr[7] == "true" ? true : false;
                    bool viewMode   = valueArr[3] == "true" ? true : false;
                    bool editMode   = valueArr[5] == "true" ? true : false;

                    if (deleteMode)
                    {
                        deleteQuestion(inputId);
                    }

                    this.Title              = viewMode ? "View a Question" : "Update a Question";
                    ViewState["viewMode"]   = viewMode;
                    ViewState["editMode"]   = editMode;
                    ViewState["deleteMode"] = deleteMode;

                    List <int> idsList = new List <int>();
                    idsList.Add(inputId);
                    List <QueQuestion> queObjectTemp = queDaoObj.questionList(idsList);
                    if (queObjectTemp.Count > 0)
                    {
                        QueQuestion queObje = queObjectTemp[0];
                        quesStmt.Text = queObje.questionStatement;
                        fillCourseTopicDropDownByCloId(DropDownList3.SelectedItem.Value);
                        DropDownList5.SelectedValue = queObje.courseTopicId.ToString();
                        fillCLODropDown(Session["CourseID"].ToString());
                        DropDownList3.SelectedValue = queObje.cloId.ToString();
                        fillSODropDown(DropDownList3.SelectedItem.Value);
                        DropDownList4.SelectedValue = queObje.soId.ToString();
                    }

                    List <QueAttributeScore> attScoreList = queDaoObj.getQuestionScoreListByID(inputId);
                    foreach (QueAttributeScore attSocre in attScoreList)
                    {
                        if (attSocre.attributeID == 1301) // CLO
                        {
                            TextBox1.SelectedValue = attSocre.scoreValue.ToString();
                        }
                        else if (attSocre.attributeID == 1302) // SO
                        {
                            TextBox2.SelectedValue = attSocre.scoreValue.ToString();
                        }
                        else if (attSocre.attributeID == 1303) // Course Topic
                        {
                            scoreTxtBx1.SelectedValue = attSocre.scoreValue.ToString();
                        }
                    }

                    DropDownList5.Enabled = !viewMode;
                    DropDownList3.Enabled = !viewMode;
                    DropDownList4.Enabled = !viewMode;
                    scoreTxtBx1.Enabled   = !viewMode;
                    Button1.Visible       = !viewMode;
                    DataList12.Enabled    = !viewMode;
                    TextBox1.Enabled      = !viewMode;
                    TextBox2.Enabled      = !viewMode;
                    quesStmt.Enabled      = !viewMode;
                    cancelBtn.Text        = viewMode ? "Close" : "Cancel";
                    Button1.Text          = editMode ? "Update" : "Submit";
                }
                else
                {
                    //FirstGridViewRow();
                    this.Title = "Add a Question";
                }
            }

            String courseIdLocal = Session["CourseID"].ToString();
            List <KMSABET.MyPocos.QueAttribute> attributeList = queDaoObj.getAttrbuteList(courseIdLocal);

            DataList12.DataSource = attributeList;
            DataList12.DataBind();

            //MyUtilities.LogUtils.myLog.Info("Selected drop down value is: " + DropDownList1.SelectedValue);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack == false && Session["CourseID"] != null)
            {
                fillCLODropDown(Session["CourseID"].ToString());
                fillCourseTopicDropDownByCloId(DropDownList3.SelectedItem.Value);
                fillSODropDown(DropDownList3.SelectedItem.Value);

                ViewState["questionList"] = null;
                ViewState["selectedQuestionList"] = null;
                ViewState["questionScoreList"] = null;

                Button myNextBtn = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepNextButton");
                Button myPreviousBtn = (Button)Wizard1.FindControl("StepNavigationTemplateContainerID$StepPreviousButton");
                if (myPreviousBtn != null)
                {
                    //LogUtils.myLog.Info("My Previous Button is not null");
                    myPreviousBtn.Visible = false;
                }

                bool editMode = Request.QueryString["editMode"] == null ? false : bool.Parse(Request.QueryString["editMode"]);
                if (editMode)
                {
                    label1.Text = "Update Assessment";
                    Wizard1.StartNextButtonText = "Add/Delete Questions";
                    setEditData();
                }
                else
                {
                    label1.Text = "Add Assessment";
                    Wizard1.ActiveStepIndex = 1;
                }
            }
            else
            {
                if (ViewState["questionList"] != null)
                {
                    questionList = (List<QueQuestion>)ViewState["questionList"];
                }

                if (ViewState["selectedQuestionList"] != null)
                {
                    selectedQuestionList = (List<QueQuestion>)ViewState["selectedQuestionList"];
                }
                if (ViewState["questionScoreList"] != null)
                {
                    questionScoreList = (List<QueQuestionScore>)ViewState["questionScoreList"];
                }

            }

            bool editMode1 = Request.QueryString["editMode"] == null ? false : bool.Parse(Request.QueryString["editMode"]);
            if (editMode1) this.Title = "Update Assessment";
            else this.Title = "Add Assessment";

            if (Session["CourseID"] != null)
            {
                String courseIdLocal = Session["CourseID"].ToString();
                List<KMSABET.MyPocos.QueAttribute> attributeList = queDaoObj.getAttrbuteList(courseIdLocal);
                DataList12.DataSource = attributeList;
                DataList12.DataBind();
            }
        }
    //void partiyalar()
    //{
    //    DataTable meqsed = klas.getdatatable("Select PartiyaID,Adi from PartiyalarSiyahi order by PartiyaID");
    //    partiya.DataTextField = "Adi";
    //    partiya.DataValueField = "PartiyaID";
    //    partiya.DataSource = meqsed;
    //    partiya.DataBind();
    //    partiya.Items.Insert(0, new ListItem("Seçin", "-1"));
    //}
    protected void btnAxtar_Click(object sender, EventArgs e)
    {
        vizual();

        DataList1.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,c.adi,c.Proqramteminat,c.Lisenziya,c.Sair,Proqramteminat+Lisenziya+Sair as Cemi " +
                                                 "from Tesnifatlar t left join IQQeyrimaddiaktiv c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=2 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList1.DataBind();

        DataList3.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,t.Tesnifatadi adi,c.Binatikili,c.Avadanliq, c.Neqliyyatvas,c.Invertar,c.Sair, c.Avadanliq + c.Neqliyyatvas +c.Binatikili+ c.Invertar + c.Sair as Cemi from  Tesnifatlar t left join IQTorpaq c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=3 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList3.DataBind();

        DataList4.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,t.Tesnifatadi adi,c.Depozit, c.Sair,c.Depozit + c.Sair as Cemi from " +
                                                 "Tesnifatlar t left join IQSairuzunmudaktiv c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=4 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList4.DataBind();

        DataList5.DataSource = klas.getdatatable(" select ROW_NUMBER() OVER (order by t.TesnifatID) SN,c.Adi,c.Defterxana,c.Yanacaq,c.Sair,c.Defterxana + c.Yanacaq + c.Sair as Cemi from " +
                                                 "Tesnifatlar t left join IQEhtiyat c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=5 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList5.DataBind();

        DataList6.DataSource = klas.getdatatable("   select ROW_NUMBER() OVER (order by c.IQqisamdebitor) SN,* from " +
                                                 " IQQisamudDebitor c where c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList6.DataBind();

        DataList7.DataSource = klas.getdatatable("    select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                 "Tesnifatlar t left join IQSairqisamudaktiv c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=7 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList7.DataBind();

        DataList8.DataSource = klas.getdatatable("  select ROW_NUMBER() OVER (order by t.TesnifatID) SN,*,Bankkredit + Lizinq as Cemi from " +
                                                 "Tesnifatlar t left join IQUzunmudfaizxerc c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=8 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList8.DataBind();

        DataList9.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,*,Bankkredit + Lizinq as Cemi from " +
                                                 "Tesnifatlar t left join IQQisamudfaizxerc c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=9 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList9.DataBind();

        DataList10.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQMecburiodenis c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=10 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList10.DataBind();

        DataList11.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQQisamudkreditor c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=11 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList11.DataBind();

        DataList12.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQSairqisamudohdelik c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=12 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList12.DataBind();

        DataList13.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQUzvlukhaqlari c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=13 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList13.DataBind();

        DataList14.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by IQAlinmisianeID) SN,IQAlinmisianeID," +
                                                  "PartiyaID, UserID, Hesabatili, Adi+' '+Soyad+' '+Ataadi adsoyad, Ianekodu, Seriyasi+', '+Nomresi+', '+ " +
                                                  "convert(nvarchar,Verilmetarixi,104) seriyanomretarix, convert(nvarchar,Dogumtarixi,104) Dogumtarixi, Unvan, Esasvesait, Malmaterial," +
                                                  " Pulformasinda, Esasvesait+Malmaterial+Pulformasinda Cemi, DaxiletmeTarixi, DeyishmeTarixi from IQAlinmisIaneler where Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and PartiyaID=" + Session["PartiyaID"].ToString());
        DataList14.DataBind();


        DataList15.DataSource = klas.getdatatable("select ROW_NUMBER() OVER (order by t.TesnifatID) SN,* from " +
                                                  "Tesnifatlar t left join IQPulvesait c on t.TesnifatID=c.TesnifatID where t.Tesnifattipi=15 and c.Hesabatili=" + DropDownListyear.SelectedValue.ToString() + " and c.PartiyaID=" + Session["PartiyaID"].ToString());
        DataList15.DataBind();
    }