Example #1
0
 public static int ThemYesIDParent(TheLoai theLoai)
 {
     try
     {
         object rs = DataProvider.Instance.ExecuteNonQueryWithOutput("@ID", "TheLoai_ThemYesIDParent",
             theLoai.ID, theLoai.TieuDe_Vn, theLoai.TieuDe_En, theLoai.TieuDe_Ru, theLoai.MoTa_Vn, theLoai.MoTa_En, theLoai.MoTa_Ru
             , theLoai.HinhAnh, theLoai.IDParent, theLoai.IDLoaiMenu, theLoai.IDModule, theLoai.DuongDan_Vn, theLoai.DuongDan_En, theLoai.DuongDan_Ru, theLoai.ViTri, theLoai.Footer, theLoai.TitleWidth, theLoai.TitleBorder);
         return Convert.ToInt32(rs);
     }
     catch
     { return 0; }
 }
Example #2
0
    private void SetData(TheLoai data)
    {
        //LoadParent(data.IDLoaiMenu.ToString());
        //LoadTheLoai();
        LoadParent();
        lblId.Text = data.ID.ToString();
        txtTieuDeVn.Text = data.TieuDe_Vn;
        txtTieuDeEn.Text = data.TieuDe_En;
        txtTieuDeRu.Text = data.TieuDe_Ru;

        txtmoTaVn.Text = data.MoTa_Vn;
        txtmoTaEn.Text = data.MoTa_En;
        txtmoTaRu.Text = data.MoTa_Ru;

        txtHinhAnh.Text = data.HinhAnh;
        txtDuongDanVn.Text = data.DuongDan_Vn;
        txtDuongDanEn.Text = data.DuongDan_En;
        txtDuongDanRu.Text = data.DuongDan_Ru;

        if (data.ViTri < 0)
            txtViTri.Text = "0";
        txtViTri.Text = data.ViTri.ToString();
        ddlParent.SelectedValue = data.IDParent.ToString();
        ddlLoadMenu.SelectedValue = data.IDLoaiMenu.ToString();
        ddlModule.SelectedValue = data.IDModule.ToString();
        drlWebsite.SelectedValue = data.Website.ToString();
    }
Example #3
0
 public static int SuaNoParent(TheLoai theLoai)
 {
     try
     {
         object rs = DataProvider.Instance.ExecuteNonQuery("TheLoai_SuaNoParent", ConvertType.ToInt32(theLoai.ID)
             , theLoai.TieuDe_Vn, theLoai.TieuDe_En, theLoai.TieuDe_Ru, theLoai.MoTa_Vn
             , theLoai.MoTa_En, theLoai.MoTa_Ru, theLoai.HinhAnh, theLoai.IDLoaiMenu
             , theLoai.IDModule, theLoai.DuongDan_Vn, theLoai.DuongDan_En, theLoai.DuongDan_Ru
             , theLoai.ViTri, theLoai.Footer, theLoai.TitleWidth, theLoai.TitleBorder);
         return Convert.ToInt32(rs);
     }
     catch
     { return 0; }
 }
Example #4
0
    private TheLoai GetData()
    {
        TheLoai data = null;
        if (lblId.Text != "")
            data = TheLoai.LayTheoID(lblId.Text);//cap nhat voi thong tin cu
        else
            data = new TheLoai();//them moi
        data.TieuDe_Vn = txtTieuDeVn.Text;
        data.TieuDe_En = txtTieuDeEn.Text;
        data.TieuDe_Ru = txtTieuDeRu.Text;
        data.TieuDe_Cn = "";

        data.MoTa_Vn = txtmoTaVn.Text;
        data.MoTa_En = txtmoTaEn.Text;
        data.MoTa_Ru = txtmoTaRu.Text;
        data.MoTa_Cn = "";

        data.HinhAnh = txtHinhAnh.Text;
        data.DuongDan_Vn = txtDuongDanVn.Text;
        data.DuongDan_En = txtDuongDanEn.Text;
        data.DuongDan_Ru = txtDuongDanRu.Text;
        data.DuongDan_Cn = "";

        data.ViTri = ConvertType.ToInt32(txtViTri.Text.Trim());
        data.IDLoaiMenu = ConvertType.ToInt32(ddlLoadMenu.SelectedValue.Trim());
        data.IDModule = ConvertType.ToInt32(ddlModule.SelectedValue.Trim());
        int idparent = ConvertType.ToInt32(ddlParent.SelectedValue.Trim());
        if (idparent > 0)
            data.IDParent = idparent;
        data.Footer = true;
        data.Website = Convert.ToInt32(drlWebsite.SelectedValue);
        return data;
    }
Example #5
0
    private void SetData(TheLoai data)
    {
        LoadParent(data.IDLoaiMenu.ToString());
        //LoadTheLoai();
        //LoadParent();
        lblId.Text = data.ID.ToString();
        txtTieuDeVn.Text = data.TieuDe_Vn;

        txtmoTaVn.Text = data.MoTa_Vn;

        txtHinhAnh.Text = data.HinhAnh;
        txtDuongDanVn.Text = data.DuongDan_Vn;

        if (data.ViTri < 0)
            txtViTri.Text = "0";
        txtViTri.Text = data.ViTri.ToString();
        ddlParent.SelectedValue = data.IDParent.ToString();
        ddlLoadMenu.SelectedValue = data.IDLoaiMenu.ToString();
        ddlModule.SelectedValue = data.IDModule.ToString();

        txtWidth.Text = data.TitleWidth;
        string border = data.TitleBorder;
        if (border.Contains("border-bot")) ckbBorderBottom.Checked = true; else ckbBorderBottom.Checked = false;
        if (border.Contains("border-top")) ckbBorderTop.Checked = true; else ckbBorderTop.Checked = false;
        if (border.Contains("border-left")) ckbBorderLeft.Checked = true; else ckbBorderLeft.Checked = false;
        if (border.Contains("border-right")) ckbBorderRight.Checked = true; else ckbBorderRight.Checked = false;
    }
Example #6
0
    private TheLoai GetData()
    {
        TheLoai data = null;
        if (lblId.Text != "")
            data = TheLoai.LayTheoID(lblId.Text);//cap nhat voi thong tin cu
        else
            data = new TheLoai();//them moi
        data.TieuDe_Vn = txtTieuDeVn.Text;
        data.TieuDe_En = "";
        data.TieuDe_Ru = "";
        data.TieuDe_Cn = "";

        data.MoTa_Vn = txtmoTaVn.Text;
        data.MoTa_En = "";
        data.MoTa_Ru = "";
        data.MoTa_Cn = "";

        data.HinhAnh = txtHinhAnh.Text;
        data.DuongDan_Vn = txtDuongDanVn.Text;
        data.DuongDan_En = "";
        data.DuongDan_Ru = "";
        data.DuongDan_Cn = "";

        data.ViTri = ConvertType.ToInt32(txtViTri.Text.Trim());
        data.IDLoaiMenu = ConvertType.ToInt32(ddlLoadMenu.SelectedValue.Trim());
        data.IDModule = ConvertType.ToInt32(ddlModule.SelectedValue.Trim());
        int idparent = ConvertType.ToInt32(ddlParent.SelectedValue.Trim());
        if (idparent > 0)
            data.IDParent = idparent;
        data.Footer = true;

        if (txtWidth.Text.Trim() == "") data.TitleWidth = "0";
        else data.TitleWidth = txtWidth.Text.Trim();

        string border = String.Empty;
        if (ckbBorderBottom.Checked) border += " border-bot";
        if (ckbBorderTop.Checked) border += " border-top";
        if (ckbBorderLeft.Checked) border += " border-left";
        if (ckbBorderRight.Checked) border += " border-right";
        data.TitleBorder = border;

        return data;
    }
Example #7
0
 private void SetData(TheLoai data)
 {
     LoadParent(data.IDLoaiMenu.ToString());
     lblId.Text = data.ID.ToString();
     txtTieuDeVn.Text = data.TieuDe_Vn;
     txtmoTaVn.Text = data.MoTa_Vn;
     txtHinhAnh.Text = data.HinhAnh;
     txtDuongDanVn.Text = data.DuongDan_Vn;
     if (data.ViTri < 0)
         txtViTri.Text = "0";
     txtViTri.Text = data.ViTri.ToString();
     ddlParent.SelectedValue = data.IDParent.ToString();
     ddlLoadMenu.SelectedValue = data.IDLoaiMenu.ToString();
     ddlModule.SelectedValue = data.IDModule.ToString();
     //if (data.Footer == true)
     //    ckbFooter.Checked = true;
 }
Example #8
0
 private TheLoai GetData()
 {
     TheLoai data = null;
     if (lblId.Text != "")
         data = TheLoai.LayTheoID(lblId.Text);//cap nhat voi thong tin cu
     else
         data = new TheLoai();//them moi
     data.TieuDe_Vn = txtTieuDeVn.Text;
     data.MoTa_Vn = txtmoTaVn.Text;
     data.HinhAnh = txtHinhAnh.Text;
     data.DuongDan_Vn = txtDuongDanVn.Text;
     data.ViTri = ConvertType.ToInt32(txtViTri.Text.Trim());
     data.IDLoaiMenu = ConvertType.ToInt32(ddlLoadMenu.SelectedValue.Trim());
     data.IDModule = ConvertType.ToInt32(ddlModule.SelectedValue.Trim());
     data.IDParent = ConvertType.ToInt32(ddlParent.SelectedValue.Trim());
     //if (ckbFooter.Checked)
     //    data.Footer = true;
     //else
     //    data.Footer = false;
     return data;
 }