Пример #1
0
    }  //读取go前textbox,导航到指定页面

    #endregion

    #region 客户联系方式表

    protected void GridView_Phone_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "dele11")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_ClientPhone.SelectedIndex = row.RowIndex;
            string Contact_id = e.CommandArgument.ToString();
            Guid   contact_id = new Guid(Contact_id);
            PCI.Proc_D_CRMCustomerContact(contact_id);

            Guid DCRMCIF_ID = new Guid(Session["ClientPhoneq_id"].ToString());
            GridView_ClientPhone.DataSource = PCI.SList_CRMCustomerContact(DCRMCIF_ID);
            GridView_ClientPhone.DataBind();
            UpdatePanel_ClientPhone.Update();
            return;
        }

        else
        if (e.CommandName == "Change")
        {
            GridViewRow row = ((LinkButton)e.CommandSource).Parent.Parent as GridViewRow;
            GridView_ClientPhone.SelectedIndex = row.RowIndex;
            GridView_ClientPhone.SelectedIndex = -1;
            string Contact_id = e.CommandArgument.ToString();
            Guid   contact_id = new Guid(Contact_id);
            Session["contact_id"] = e.CommandArgument.ToString();

            TextBox_ChanPhoneName.Text     = row.Cells[1].Text.Trim().ToString().Replace(" ", "");
            TextBox_ChanPhonePosition.Text = row.Cells[2].Text.Trim().ToString().Replace(" ", "");
            TextBox_ChanPhoneCall.Text     = row.Cells[3].Text.Trim().ToString().Replace(" ", "");
            TextBox_ChanPhoneMobile.Text   = row.Cells[4].Text.Trim().ToString().Replace(" ", "");
            TextBox_ChanPhoneFax.Text      = row.Cells[5].Text.Trim().ToString().Replace(" ", "");
            TextBox_ChanPhoneE_Mail.Text   = row.Cells[6].Text.Trim().ToString().Replace(" ", "");
            TextBox_ChanPhoneQQ.Text       = row.Cells[7].Text.Trim().ToString().Replace(" ", "");

            Panel_ChanClientPhone.Visible = true;
            UpdatePanel_ChanClientPhone.Update();
            return;
        }
        else if (e.CommandName == "Important1")
        {
            sad.Update_Important(new Guid(e.CommandArgument.ToString()));
            Guid DCRMCIF_ID = new Guid(Session["ClientPhoneq_id"].ToString());
            GridView_ClientPhone.DataSource = PCI.SList_CRMCustomerContact(DCRMCIF_ID);
            GridView_ClientPhone.DataBind();
            UpdatePanel_ClientPhone.Update();
        }
    }
Пример #2
0
    protected void Btn_ChanPhoneOk_Click(object sender, EventArgs e)
    {
        Guid   CRMCC_ID           = new Guid(Session["contact_id"].ToString());
        Guid   CRMCIF_ID          = new Guid(Session["ClientPhoneq_id"].ToString());
        string CRMCC_Name         = TextBox_ChanPhoneName.Text.Trim().ToString();
        string CRMCC_Position     = TextBox_ChanPhonePosition.Text.Trim().ToString();
        string CRMCC_PhoneNum     = TextBox_ChanPhoneCall.Text.Trim().ToString();
        string CRMCC_TelePhoneNum = TextBox_ChanPhoneMobile.Text.Trim().ToString();
        string CRMCC_FaxNum       = TextBox_ChanPhoneFax.Text.Trim().ToString();
        string CRMCC_Email        = TextBox_ChanPhoneE_Mail.Text.Trim().ToString();
        string CRMCC_QQ           = TextBox_ChanPhoneQQ.Text.Trim().ToString();

        PCI.Proc_U_CRMCustomerContact(CRMCC_ID, CRMCIF_ID, CRMCC_Name, CRMCC_Position, CRMCC_PhoneNum, CRMCC_TelePhoneNum, CRMCC_FaxNum, CRMCC_Email, CRMCC_QQ);
        GridView_ClientPhone.DataSource = PCI.SList_CRMCustomerContact(CRMCIF_ID);
        GridView_ClientPhone.DataBind();
        Panel_ChanClientPhone.Visible = false;
        UpdatePanel_ChanClientPhone.Update();
        UpdatePanel_ClientPhone.Update();
        ScriptManager.RegisterStartupScript(Page, typeof(Page), "alert", "alert('修改成功!')", true);
        return;
    }
Пример #3
0
 protected void Btn_ChanPhoneCancel_Click(object sender, EventArgs e)
 {
     Panel_ChanClientPhone.Visible = false;
     UpdatePanel_ChanClientPhone.Update();
 }