예제 #1
0
    private void BindGVData(int parentID)
    {
        DataTable dt = ServiceModelService.Get_SonModelListByParent(parentID);

        GridView1.DataSource = dt;
        GridView1.DataBind();
    }
예제 #2
0
 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "delRecord")
     {
         int mid = Convert.ToInt32(e.CommandArgument);
         ServiceModelService.Delete_ServiceModel(mid);
         BindGVData(Convert.ToInt32(ddlSearch.SelectedValue));
     }
 }
예제 #3
0
 protected void ServiceItem_Command(object sender, CommandEventArgs e)
 {
     if (e.CommandName == "serviceitem")
     {
         int mid = Convert.ToInt32(e.CommandArgument);
         ViewState["mid"]      = mid;
         ViewState["itemName"] = ServiceModelService.Get_ServiceItemName(mid);
         binddata(((ServiceInfo)Session["serviceinfo"]).S_ID, mid);
     }
 }
예제 #4
0
    private void BindModelData()
    {
        DataTable dt = ServiceModelService.Get_ParentModelList();

        ddlSearch.DataSource = dt;


        ddlSearch.DataValueField = "M_ID";
        ddlSearch.DataTextField  = "M_Name";


        ddlSearch.DataBind();
    }
예제 #5
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        if (txtName.Text == "")
        {
            CommonFunction.Alert(Literal1, "请输入模块名称");
            return;
        }
        ServiceModel model = new ServiceModel();

        model.M_Name     = txtName.Text;
        model.M_ParentID = Convert.ToInt32(ddlModel.SelectedValue);
        ServiceModelService.Insert_ServiceModel(model);
        CommonFunction.Alert(Literal1, "添加成功");
        txtName.Text = "";
    }
예제 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         CommonFunction.isSelectedService();
         Title = "服务内容-" + ((ServiceInfo)Session["serviceinfo"]).S_Name + "门户网站";
         int mid = 1;
         if (Request.QueryString["mid"] != null)
         {
             mid = Convert.ToInt32(Request.QueryString["mid"]);
         }
         ViewState["mid"]      = mid;
         ViewState["itemName"] = ServiceModelService.Get_ServiceItemName(mid);
         binddata(((ServiceInfo)Session["serviceinfo"]).S_ID, mid);
     }
 }
예제 #7
0
    void BindNavData(int pid)
    {
        DataTable dt = ServiceModelService.Get_SonModelListByParent(pid);

        RepeaterNav.DataSource = dt;
        RepeaterNav.DataBind();
        if (dt != null && dt.Rows.Count > 0)
        {
            ViewState["mid"] = Convert.ToInt32(dt.Rows[0]["M_ID"]);
            binddata(((UserInfo)Session["ServiceUser"]).U_SID, Convert.ToInt32(ViewState["mid"]));
            lblSelectedModel.Text    = dt.Rows[0]["M_Name"].ToString();
            linkAddTitle.NavigateUrl = "AddServiceItemNews.aspx?mid=" + Convert.ToInt32(ViewState["mid"]) + "&action=add";
        }
        else
        {
            linkAddTitle.Visible     = false;
            lblSelectedModel.Visible = false;
        }
    }