Exemplo n.º 1
0
    //---------------------Portal Services Gridview
    protected void fillgriddata()
    {
        String st1   = "";
        string sgggg = "";

        DataTable dtservice = select(" SELECT dbo.PriceplanCategorySubType.UniqueID, dbo.PriceplanCategorySubType.Name as CategorySubTypeName, dbo.PriceplanCategorySubType.Description FROM dbo.Priceplancategory INNER JOIN dbo.PriceplanCategoryType ON dbo.Priceplancategory.CategoryTypeID = dbo.PriceplanCategoryType.ID INNER JOIN  dbo.PriceplanCategorySubType ON dbo.Priceplancategory.CategoryTypeSubID = dbo.PriceplanCategorySubType.UniqueID where PortalId='" + ddlportal.SelectedValue + "' and CategoryTypeID='14' order  by dbo.PriceplanCategorySubType.Name ");

        if (dtservice.Rows.Count > 0)
        {
            lblservices.Text = ddlportal.SelectedItem.Text + " Provides some very useful services for the Priceplan you are subscribing.  ";
            // ModalPopupExtendershowShared.Show();
            pnlservicetype.Visible = true;
            if (dtservice.Rows.Count > 0)
            {
                Gv_ServerHostPortal.DataSource = dtservice;
                Gv_ServerHostPortal.DataBind();
                Gv_ServerHostPortal.Visible = true;
                ModalPopupExtendershowShared.Show();
            }
            else
            {
                Gv_ServerHostPortal.DataSource = null;
                Gv_ServerHostPortal.DataBind();
            }
        }
        else
        {
        }
    }
Exemplo n.º 2
0
    protected void Gv_ServerHostPortal_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Remove")
        {
            int       mm   = Convert.ToInt32(e.CommandArgument);
            DataTable dtsd = select("SELECT dbo.OrderMasterDetail.ID ,dbo.Priceplancategory.CategoryTypeSubID, dbo.Priceplancategory.CategoryName +' : '+ dbo.PricePlanMaster.PricePlanName +' : '+ dbo.PricePlanMaster.PricePlanAmount as PricePlanName, dbo.OrderMasterDetail.ordermasterid FROM  dbo.PricePlanMaster INNER JOIN dbo.OrderMasterDetail ON dbo.PricePlanMaster.PricePlanId = dbo.OrderMasterDetail.Priceplanid INNER JOIN dbo.Priceplancategory ON dbo.PricePlanMaster.PriceplancatId = dbo.Priceplancategory.ID Where  dbo.Priceplancategory.CategoryTypeSubID='" + mm + "' and dbo.OrderMasterDetail.ordermasterid='" + Session["orderid"] + "' ");

            if (con.State.ToString() != "Open")
            {
                con.Open();
            }
            SqlCommand cmd = new SqlCommand("OrderMasterDetail_AddDelUpdtSelect", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@StatementType", "Delete");
            cmd.Parameters.AddWithValue("@ID", dtsd.Rows[0]["ID"].ToString());
            cmd.ExecuteNonQuery();
            con.Close();
            fillgriddata();
        }
        if (e.CommandName == "Select")
        {
            int mm = Convert.ToInt32(e.CommandArgument);
            ViewState["subcateid"] = mm;
            ddlproduct_SelectedIndexChanged(sender, e);
            ModalPopupExtendershowShared.Hide();
        }
    }
Exemplo n.º 3
0
    public void ServercheckboxAllow(string servicePPID)
    {
        DataTable dtcln = select(" Select  dbo.PortalMasterTbl.PortalName, dbo.PricePlanMaster.PricePlanId, dbo.PricePlanMaster.PricePlanName, dbo.PricePlanMaster.PricePlanAmount FROM            dbo.PricePlanMaster INNER JOIN dbo.PortalMasterTbl ON dbo.PricePlanMaster.PortalMasterId1 = dbo.PortalMasterTbl.Id Where PricePlanId='" + servicePPID + "'  ");//and Producthostclientserver='0'

        if (dtcln.Rows.Count > 0)
        {    //----------------------------------------------------------
             //Insertas a OrderMaster-----Main PP ID-------------------------------
            InsertOrderMasterDetail(Session["orderid"].ToString(), servicePPID, dtcln.Rows[0]["PricePlanAmount"].ToString(), false, true, false);
            //-------------------------------------------------------------------------
        }
        ModalPopupExtendershowShared.Show();
        fillgriddata();
    }