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


C# Client.getIDCliente方法代码示例

本文整理汇总了C#中Client.getIDCliente方法的典型用法代码示例。如果您正苦于以下问题:C# Client.getIDCliente方法的具体用法?C# Client.getIDCliente怎么用?C# Client.getIDCliente使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Client的用法示例。


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

示例1: Confirm_Click

    protected void Confirm_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            MembershipUser user = Membership.GetUser();
            SQLDatabaseManager db = new SQLDatabaseManager();
            Client c = new Client(user.ProviderUserKey.ToString());
            int id = c.getIDCliente();


            Dictionary<String, String> InsertData = new Dictionary<String, String>()
            {
                {"IDCliente", id.ToString()},
                {"Nome", tnome.Text},
                {"Morada", tmorada.Text},
                {"DataNasc", tdata.Text},
                {"Contacto", tcontacto.Text},
                {"Condicoes",tcondicoes.Text}
                
            };


            db.Insert("Idoso", InsertData);
            Response.Redirect("~/Clients/MainPage.aspx");
        }
    }
开发者ID:swigz,项目名称:AIMC,代码行数:26,代码来源:AddIdoso.aspx.cs

示例2: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        MembershipUser user = Membership.GetUser();
        SQLDatabaseManager db = new SQLDatabaseManager();
        Client c = new Client(user.ProviderUserKey.ToString());
        int id = c.getIDCliente();
        String query = String.Format("SELECT I.Nome, I.Morada, I.Contacto, S.Servico, S.Notas, S.Horario, S.Status, V.Nome AS Vnome, V.Contactos From Idoso I, Servico S, Voluntario V WHERE S.IDCliente=I.IDCliente AND V.IDVoluntario=S.IDVoluntario AND I.IDIdoso=S.IDIdoso AND S.IDCliente='{0}'", id);

        DataTable temp;
        temp = db.GetDataTable(query);

        GridView1.DataSource = temp;
        GridView1.DataBind();

    }
开发者ID:swigz,项目名称:AIMC,代码行数:15,代码来源:VerServico.aspx.cs

示例3: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        MembershipUser user = Membership.GetUser();
        SQLDatabaseManager db = new SQLDatabaseManager();
        Client c = new Client(user.ProviderUserKey.ToString());
        int id = c.getIDCliente();

        String query = String.Format("SELECT Nome, Morada, Contacto, DataNasc, Condicoes FROM Idoso WHERE IDCliente='{0}'", id);
        DataTable temp;
        temp = db.GetDataTable(query);

        GridView1.DataSource = temp;
        GridView1.DataBind();


    }
开发者ID:swigz,项目名称:AIMC,代码行数:16,代码来源:ManageIdosos.aspx.cs

示例4: add_Click

    protected void add_Click(object sender, EventArgs e)
    {
        
            if(DropDownList1.SelectedIndex.Equals(0))
            {
                Label1.Visible = true;
            }
        
            MembershipUser user = Membership.GetUser();
            SQLDatabaseManager db = new SQLDatabaseManager();
            Client c = new Client(user.ProviderUserKey.ToString());
            int idcliente = c.getIDCliente();
            int ididoso = c.getIDIdoso(idcliente, DropDownList1.SelectedItem.Text);

            

            foreach (ListItem item in CheckBoxList1.Items)
            {
                if (item.Selected)
                {
                    selected += item.Text + " - ";
                }
            }
            
            Dictionary<String, String> InsertData = new Dictionary<String, String>()
            {

                {"IDCliente", idcliente.ToString()},
                {"IDIdoso", ididoso.ToString()},
                {"Servico", selected},
                {"Notas", tnotas.Text},
                {"Horario", thorario.Text},
                {"Status", "Não Aceite"},
                {"IDVoluntario", "15"}
            };
            if (!db.Insert("dbo.Servico", InsertData))
            {
                Response.Redirect("Erro ao criar entrada");
            }
            else
            {
                Response.Redirect("~/Clients/VerServico.aspx");

            }
    }
开发者ID:swigz,项目名称:AIMC,代码行数:45,代码来源:AddServico.aspx.cs

示例5: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            MembershipUser user = Membership.GetUser();
            SQLDatabaseManager db = new SQLDatabaseManager();
            Client c = new Client(user.ProviderUserKey.ToString());
            int id = c.getIDCliente();

            String query = String.Format("SELECT IDIdoso, Nome From Idoso WHERE IDCliente='{0}'", id);
            DataTable temp;
            temp = db.GetDataTable(query);
            DropDownList1.DataValueField = "IDIdoso";
            DropDownList1.DataTextField = "Nome";
            DropDownList1.DataSource = temp;
            DropDownList1.DataBind();
            DropDownList1.Items.Insert(0, "Escolha um idoso.");
        }
    }
开发者ID:swigz,项目名称:AIMC,代码行数:19,代码来源:DelIdoso.aspx.cs

示例6: Page_Load

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            MembershipUser user = Membership.GetUser();
            SQLDatabaseManager db = new SQLDatabaseManager();
            Client c = new Client(user.ProviderUserKey.ToString());
            int id = c.getIDCliente();

            String query = String.Format("SELECT S.IDServico, S.Servico, I.Nome From Servico S, Idoso I WHERE I.IDIdoso=S.IDIdoso AND S.IDCliente='{0}'", id);
            DataTable temp;
            temp = db.GetDataTable(query);
            temp.Columns.Add("NomeServico", typeof(string), "Nome + ' - ' + Servico");
            DropDownList1.DataValueField = "IDServico";
            DropDownList1.DataTextField = "NomeServico";
            DropDownList1.DataSource = temp;
            DropDownList1.DataBind();
            DropDownList1.Items.Insert(0, "Escolha o serviço a alterar.");
        }
    }
开发者ID:swigz,项目名称:AIMC,代码行数:20,代码来源:AlterServico.aspx.cs

示例7: DropDownList1_SelectedIndexChanged

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
            Confirm.Enabled = true;
            MembershipUser user = Membership.GetUser();
            SQLDatabaseManager db = new SQLDatabaseManager();
            Client c = new Client(user.ProviderUserKey.ToString());
            int id = c.getIDCliente();
            String query = String.Format("SELECT Nome, Morada, DataNasc, Contacto, Condicoes FROM Idoso WHERE IDIdoso='{0}'", DropDownList1.SelectedValue);
            DataTable temp;
            temp = db.GetDataTable(query);

            tnome.Text = temp.Rows[0]["Nome"].ToString();
            tmorada.Text = temp.Rows[0]["Morada"].ToString();
            tdata.Text = temp.Rows[0]["DataNasc"].ToString();
            tcondicoes.Text = temp.Rows[0]["condicoes"].ToString();
            tcontacto.Text = temp.Rows[0]["Contacto"].ToString();
        
        
        
    }
开发者ID:swigz,项目名称:AIMC,代码行数:20,代码来源:AlterIdoso.aspx.cs


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