コード例 #1
0
        internal override void CreateContactAfterFaxInSave(int faxId, int recipId, int docId)
        {
            DataRow dataRow = Environment.FaxInData.GetFaxIn(faxId);

            if (dataRow == null)
            {
                return;
            }

            using (DataTable dt = Environment.DocData.GetDocPersonsLite(docId, false))
            {
                string[] prsn =
                    dt.Rows.Cast <DataRow>().Where(r => (int)r[Environment.PersonData.IDField] != recipId).
                    Select(r => r[Environment.PersonData.IDField].ToString()).ToArray();

                var ccDialog = new ContactDialog(Environment.CreateContactString,
                                                 "personContactCategor=3&personContactType=30&personContactText=" +
                                                 dataRow[
                                                     Environment.FaxData.
                                                     SenderAddressField] +
                                                 ((prsn != null && prsn.Length > 0)
                                                      ? "&PersonsListContact=" +
                                                  string.Join(",", prsn)
                                                      : "") + "&docview=yes");
                ccDialog.DialogEvent += CreateContactDialog_DialogEvent;
                ccDialog.PersonID     = faxId;
                ccDialog.TopLevel     = true;
                ccDialog.Show();

                dt.Dispose();
            }
        }
コード例 #2
0
        internal override void setPersonItem_Click(object sender, EventArgs e)
        {
            var faxID    = (int)grid.GetCurValue(Environment.FaxData.IDField);
            var ccDialog = new ContactDialog(Environment.CreateContactString, "personContactCategor=3&docview=yes&personContactText=" + grid.GetCurValue(Environment.FaxData.RecipField));

            ccDialog.DialogEvent += createContactDialog_DialogEvent;
            ccDialog.PersonID     = faxID;
            ccDialog.Show();
        }
コード例 #3
0
        private void cont_EditPush(object sender, EventArgs e)
        {
            if (!(sender is CheckControl))
            {
                return;
            }
            var cont     = sender as CheckControl;
            var ccDialog = new ContactDialog(Environment.CreateContactString, "docview=yes&id=" + cont.ID.ToString() + "&idclient=" + PersonID.ToString(),
                                             Environment.StringResources.GetString("ContactEdit"));

            ccDialog.DialogEvent += ccDialog_DialogEvent;
            ccDialog.Show();
        }
コード例 #4
0
ファイル: MainWindow.cs プロジェクト: Uppley/business_planner
        private void AddNewContactToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ContactDialog cod = new ContactDialog();

            cod.Show();
        }