当前位置: 首页>>代码示例>>C#>>正文


C# DBLayer类代码示例

本文整理汇总了C#中DBLayer的典型用法代码示例。如果您正苦于以下问题:C# DBLayer类的具体用法?C# DBLayer怎么用?C# DBLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DBLayer类属于命名空间,在下文中一共展示了DBLayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["CurrentUser"] == null)
         {
             Response.Redirect("Login.aspx");
         }
         if (CurrentPage != 0)
         {
             //BindData();
             DBLayer db = new DBLayer();
             DataSet ds = new DataSet();
             ds = db.GetPageContent(CurrentPage);
             if (ds.Tables[0].Rows.Count > 0)
             {
                 uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["arTitle"].ToString();
                 uiFCKeditorContent.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["arContent"].ToString());
             }
             uiPanelCurrentPages.Visible = false;
             uiPanelCurrent.Visible = true;
         }
         else
         {
             Response.Redirect("AdminCP.aspx");
         }
     }
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:28,代码来源:EditPageContent.aspx.cs

示例2: uiGridViewCats_RowCommand

 protected void uiGridViewCats_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditCat")
     {
         int id = Convert.ToInt32(e.CommandArgument.ToString());
         CurrentCat = id;
         DBLayer db = new DBLayer();
         DataSet ds = new DataSet();
         ds = db.GetCategoryContent(id);
         if (ds.Tables[0].Rows.Count > 0)
         {
             uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["CategoryName"].ToString();
             uiTextBoxArTitle.Text = ds.Tables[0].Rows[0]["CategoryArName"].ToString();
         }
         uiPanelCurrentPages.Visible = false;
         uiPanelCurrent.Visible = true;
     }
     else if (e.CommandName == "DeleteCat")
     {
         int id = Convert.ToInt32(e.CommandArgument.ToString());
         CurrentCat = id;
         DBLayer db = new DBLayer();
         db.DeleteCategory(id);
         BindData();
     }
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:26,代码来源:EditCategories.aspx.cs

示例3: uiLinkButtonUpdate_Click

 protected void uiLinkButtonUpdate_Click(object sender, EventArgs e)
 {
     DBLayer db = new DBLayer();
     string imagepath = "";
     if (uiFileUploadImage.HasFile)
     {
         uiFileUploadImage.SaveAs(Server.MapPath(ConfigurationManager.AppSettings["UserFilePath"] + "UploadedImages/" + uiFileUploadImage.FileName));
         imagepath = ConfigurationManager.AppSettings["UserFilePath"] + "UploadedImages/" + uiFileUploadImage.FileName;
     }
     // update
     if (CurrentPackage != 0)
     {
         DataSet ds = new DataSet();
         ds = db.GetPackageContent(CurrentPackage);
         string temp = ds.Tables[0].Rows[0]["arImagepath"].ToString();
         if (temp != imagepath && string.IsNullOrEmpty(imagepath))
             db.SetArabicPackageContent(CurrentPackage, uiTextBoxBrief.Text, Server.HtmlEncode(uiFCKeditorContent.Value), uiTextBoxTitle.Text, temp, Convert.ToInt32(uiTextBoxOrder.Text));
         else
             db.SetArabicPackageContent(CurrentPackage, uiTextBoxBrief.Text, Server.HtmlEncode(uiFCKeditorContent.Value), uiTextBoxTitle.Text, imagepath, Convert.ToInt32(uiTextBoxOrder.Text));
     }
     else // add new
     {
         db.AddArabicPackageContent(uiTextBoxBrief.Text, Server.HtmlEncode(uiFCKeditorContent.Value), uiTextBoxTitle.Text, imagepath, Convert.ToInt32(uiTextBoxOrder.Text));
     }
     uiPanelViewPackages.Visible = true;
     uiPanelEditPackage.Visible = false;
     ClearFields();
     CurrentPackage = 0;
     BindData();
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:30,代码来源:EditPackages.aspx.cs

示例4: uiGridViewNews_RowCommand

 protected void uiGridViewNews_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "Editmails")
     {
         int id = Convert.ToInt32(e.CommandArgument.ToString());
         CurrentMail = id;
         DBLayer db = new DBLayer();
         DataSet ds = new DataSet();
         ds = db.GetNewsContent(id);
         if (ds.Tables[0].Rows.Count > 0)
         {
             uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["Email"].ToString();
             uiTextBoxPosition.Text = ds.Tables[0].Rows[0]["Position"].ToString();
         }
         uiPanelCurrentNews.Visible = false;
         uiPanelCurrent.Visible = true;
     }
     else if (e.CommandName == "Deletemails")
     {
         DBLayer db = new DBLayer();
         db.DeleteBookingMails(Convert.ToInt32(e.CommandArgument.ToString()));
         BindData();
         uiPanelCurrentNews.Visible = true;
         uiPanelCurrent.Visible = false;
     }
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:26,代码来源:BookingMails.aspx.cs

示例5: uiGridViewContacts_RowCommand

        protected void uiGridViewContacts_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "EditContact")
            {
                DBLayer db = new DBLayer();
                CurrentContact = Convert.ToInt32(e.CommandArgument);
                DataSet ds = db.GetContactContent(CurrentContact);
                uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
                uiTextBoxLatitude.Text = ds.Tables[0].Rows[0]["Latitude"].ToString();
                uiTextBoxLongitude.Text = ds.Tables[0].Rows[0]["Longitude"].ToString();
                uiTextBoxContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString());
                uiTextBoxMail.Text = ds.Tables[0].Rows[0]["email"].ToString();
                uiPanelViewContact.Visible = false;
                uiPanelEdit.Visible = true;

            }
            else if (e.CommandName == "DeleteContact")
            {
                DBLayer db = new DBLayer();
                db.DeleteContact(Convert.ToInt32(e.CommandArgument));
                CurrentContact = 0;
                BindData();

            }
        }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:25,代码来源:contactUs.aspx.cs

示例6: BindData

 private void BindData()
 {
     DBLayer db = new DBLayer();
     if (!string.IsNullOrEmpty(uiDropDownListCats.SelectedValue))
         uiDataListPhotos.DataSource = db.GetAllProductByCatID(Convert.ToInt32(uiDropDownListCats.SelectedValue));
     uiDataListPhotos.DataBind();
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:7,代码来源:EditGallery.aspx.cs

示例7: uiGridViewBlocks_RowCommand

 protected void uiGridViewBlocks_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "EditBlock")
     {
         int id = Convert.ToInt32(e.CommandArgument.ToString());
         CurrentBlock = id;
         DBLayer db = new DBLayer();
         DataSet ds = new DataSet();
         ds = db.GetBlockContent(id);
         if (ds.Tables[0].Rows.Count > 0)
         {
             uiTextBoxTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
             uiFCKeditor.Value = Server.HtmlDecode(ds.Tables[0].Rows[0]["Brief"].ToString());
             if (!string.IsNullOrEmpty(ds.Tables[0].Rows[0]["Imagepath"].ToString()))
             {
                 uiImageCurrent.ImageUrl = ds.Tables[0].Rows[0]["Imagepath"].ToString();
                 uiImageCurrent.Visible = true;
             }
             else
             {
                 uiImageCurrent.Visible = false;
             }
         }
         uiPanelCurrentBlocks.Visible = false;
         uiPanelCurrent.Visible = true;
     }
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:27,代码来源:EditHomeBlocks.aspx.cs

示例8: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["SID"] != null && !string.IsNullOrEmpty(Request.QueryString["SID"]))
         {
             uiPanelAllServices.Visible = false;
             uiPanelViewService.Visible = true;
             int id = Convert.ToInt32(Request.QueryString["SID"].ToString());
             DBLayer db = new DBLayer();
             DataSet ds = new DataSet();
             ds = db.GetServicesContent(id);
             uiImageService.ImageUrl = ds.Tables[0].Rows[0]["arImagePath"].ToString();
             uiLabelTitle.Text = ds.Tables[0].Rows[0]["arTitle"].ToString();
             uiLiteralBrief.Text = ds.Tables[0].Rows[0]["arBrief"].ToString();
             uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["arContent"].ToString());
         }
         else
         {
             uiPanelAllServices.Visible = true;
             uiPanelViewService.Visible = false;
             BindData();
         }
     }
     RegisterStartupScript("menu", "<script type='text/javascript'>$(\"#m4\").addClass(\"selected\");</script>");
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:26,代码来源:Services.aspx.cs

示例9: UpdateFields

 public int UpdateFields(int fieldId)
 {
     int successStatusCode = 0;
     DBLayer dbLayerUpdateFieldTable = new DBLayer();
     successStatusCode = dbLayerUpdateFieldTable.GetUpdateFieldTable(fieldId);
     return successStatusCode;
 }
开发者ID:pradeepkiran,项目名称:Test,代码行数:7,代码来源:UpdateFieldTable.aspx.cs

示例10: LoadDDls

 private void LoadDDls()
 {
     DBLayer db = new DBLayer();
     uiDropDownListCats.DataSource = db.GetAllCats();
     uiDropDownListCats.DataTextField = "CategoryName";
     uiDropDownListCats.DataValueField = "ID";
     uiDropDownListCats.DataBind();
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:8,代码来源:EditGallery.aspx.cs

示例11: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     DBLayer db = new DBLayer();
     DataSet ds = new DataSet();
     ds = db.GetPageContent(2);
     uiLabelTitle.Text = ds.Tables[0].Rows[0]["Title"].ToString();
     uiLiteralContent.Text = Server.HtmlDecode(ds.Tables[0].Rows[0]["Content"].ToString());
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:8,代码来源:default.aspx.cs

示例12: uiDataListProductMedia_ItemCommand

 protected void uiDataListProductMedia_ItemCommand(object source, DataListCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         DBLayer db = new DBLayer();
         db.Deleteitem(Convert.ToInt32(e.CommandArgument));
         LoadProjectPhotos();
     }
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:9,代码来源:EditProjects.aspx.cs

示例13: BindProducts

        private void BindProducts()
        {
            DBLayer db = new DBLayer();
            DataSet ds = new DataSet();
            ds = db.GetAllProductByCatID(Convert.ToInt32(Request.QueryString["cid"].ToString()));

            uiRepeaterProducts.DataSource = ds;
            uiRepeaterProducts.DataBind();
        }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:9,代码来源:ProductMaster.Master.cs

示例14: GetExistingData

    public DataTable GetExistingData()
    {
        DataTable dtExistingData = new DataTable();
        DBLayer dbLayerExistingData = new DBLayer();

        dtExistingData = dbLayerExistingData.GetExistingData();

        return dtExistingData;
    }
开发者ID:pradeepkiran,项目名称:Test,代码行数:9,代码来源:DeleteAllUsers.aspx.cs

示例15: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            DBLayer db = new DBLayer();

            uiRepeaterCats.DataSource = db.GetAllCats();
            uiRepeaterCats.DataBind();

            uiRepeaterGallery.DataSource = db.GetAllProducts();
            uiRepeaterGallery.DataBind();
        }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:10,代码来源:Gallery.aspx.cs


注:本文中的DBLayer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。