本文整理汇总了C#中System.Utils.InsertPlanRecords方法的典型用法代码示例。如果您正苦于以下问题:C# Utils.InsertPlanRecords方法的具体用法?C# Utils.InsertPlanRecords怎么用?C# Utils.InsertPlanRecords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Utils
的用法示例。
在下文中一共展示了Utils.InsertPlanRecords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnClick
//.........这里部分代码省略.........
if (!FabricUTILS.StartEditing(pWS, bIsUnVersioned))
{
pProgressorDialog.HideDialog();
Cleanup(null, null, pTable, pPlansTable, pWS, pProgressorDialog, true);
FabricUTILS = null;
return;
}
int iNewPlanID = 0;
//Need to collect the choices from the UI and write the results to the DB
ICadastralFabricSchemaEdit2 pSchemaEd = (ICadastralFabricSchemaEdit2)m_pCadaFab;
if (MissingPlansDialog.radioBtnExistingPlan.Checked)
{//Get the id of the EXISTING Plan
string sPlanString = MissingPlansDialog.listPlans.SelectedItem.ToString();
string[] sPlanOID = Regex.Split(sPlanString, "oid:");
sPlanOID[1].Trim();
iNewPlanID = Convert.ToInt32(sPlanOID[1].Remove(sPlanOID[1].LastIndexOf(")")));
}
Dictionary<string, int> PlanLookUp= new Dictionary<string,int>();
ArrayList iUnitsAndFormat = new ArrayList();
iUnitsAndFormat.Add(m_AngleUnits);
iUnitsAndFormat.Add(m_AreaUnits);
iUnitsAndFormat.Add(m_DistanceUnits);
iUnitsAndFormat.Add(m_DirectionFormat);
iUnitsAndFormat.Add(m_LineParams);
if (MissingPlansDialog.radioBtnUserDef.Checked)
{ //create a NEW plan named with user's entered text
ArrayList sPlanInserts = new ArrayList();
pSchemaEd.ReleaseReadOnlyFields(pPlansTable, esriCadastralFabricTable.esriCFTPlans); //release safety-catch
sPlanInserts.Add(MissingPlansDialog.txtPlanName.Text);
FabricUTILS.InsertPlanRecords(pPlansTable, sPlanInserts,iUnitsAndFormat,PlansList, bIsUnVersioned,
null, null, ref PlanLookUp);
if (!PlanLookUp.TryGetValue(MissingPlansDialog.txtPlanName.Text, out iNewPlanID))
{
Cleanup(null, null, pTable, pPlansTable, pWS, pProgressorDialog, true);
FabricUTILS = null;
return;
}
}
if (MissingPlansDialog.radioBtnPlanID.Checked)
{//create multiple new plans for each PlanID
ArrayList sPlanInserts = new ArrayList();
foreach (ListViewItem listItem in MissingPlansDialog.listViewByGroup.CheckedItems)
sPlanInserts.Add("[" + listItem.SubItems[0].Text + "]");
pSchemaEd.ReleaseReadOnlyFields(pPlansTable, esriCadastralFabricTable.esriCFTPlans); //release safety-catch
FabricUTILS.InsertPlanRecords(pPlansTable, sPlanInserts, iUnitsAndFormat, PlansList, bIsUnVersioned,
null, null, ref PlanLookUp);
}
ArrayList sParcelUpdates = new ArrayList();
sParcelUpdates.Add("");
int i = 0;
int iCnt = 0;
int iTokenLimit = 995;
foreach (ListViewItem listItem in MissingPlansDialog.listView1.CheckedItems)
{
string s = listItem.SubItems[1].Text;
string[] sItems = Regex.Split(s, "id:");
if (iCnt >= iTokenLimit)//time to start a new row
{
sParcelUpdates.Add("");//add a new item to the arraylist