本文整理汇总了C#中Record.SetAssignee方法的典型用法代码示例。如果您正苦于以下问题:C# Record.SetAssignee方法的具体用法?C# Record.SetAssignee怎么用?C# Record.SetAssignee使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Record
的用法示例。
在下文中一共展示了Record.SetAssignee方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateNewRMRecord
//.........这里部分代码省略.........
case ".CFM": //NS
case ".XLTM": //NS
case ".SHX": //NS
case ".PPSX": //NS
case ".CSS": //NS
case ".XLTX": //NS
case ".JS": //NS"
case ".OTF": //NS
case ".VST": //NS
case ".WMV": //NS
case ".WMZ": //NS
case ".OFT": //NS
case ".MOV": //NS
case ".PPS": //NS
case ".MDB": //NS
case ".EPS": //NS
case ".XPS": //NS
case ".XLSB": //NS
case ".MID": //NS
case ".THMX": //NS
case ".TMP": //NS
case ".TTF": //NS
case ".MXD": //NS
case ".ICS": //NS
case ".DOCM": //NS
case ".BPMN": //NS
case ".AI": //NS
case ".AVI": //NS
case ".DXF": //NS
case ".INI": //NS
case ".LOG": //NS
case ".LST": //NS
case ".ODT": //NS
case ".PARTIAL": //NS
case ".POT": //NS
case ".POTX": //NS
case ".VSDX": //NS
case ".SKP": //NS
case ".SHS": //NS
case ".RPT": //NS
case ".XLA": //NS
rt = new RecordType(db, 2);
break;
//Images
case ".JPG":
case ".TIF":
case ".jpg":
case ".tif":
case ".PNG":
case ".png":
case ".JPEG":
case ".jpeg":
case ".GIF":
case ".gif":
case ".BMP":
case ".bmp":
case ".MPEG":
case ".TIFF":
rt = new RecordType(db, 14);
break;
//Mail
case ".EML":
case ".eml":
case ".msg":
case ".MSG":
rt = new RecordType(db, 3);
newtitle = SetEmailTitle(FileLoc);
break;
}
Record rcont = new Record(db, cont);
Record r = new Record(rt);
Location lo = new Location(db, 5503);
if (newtitle != null)
r.Title = newtitle;
r.SetDocument(FileLoc);
r.SetAssignee(lo);
r.SetOwnerLocation(lo);
r.Container = rcont;
r.Save();
uri = r.Uri;
Console.WriteLine("Migrated document from: " + FileLoc + " and saved as " + r.Number);
db.LogExternalEvent("Document migrated from: " + FileLoc, BaseObjectTypes.Record, uri, true);
}
else
{
Console.WriteLine("Document location does not exist: " + FileLoc);
db.LogExternalEvent("Document location does not exist: "+FileLoc, BaseObjectTypes.Record, Convert.ToInt64(cont), true);
}
}
catch (Exception exp)
{
Console.WriteLine("Error: " + exp.Message.ToString());
db.LogExternalEvent("Error migrating: " + FileLoc+" Error: "+exp.Message.ToString(), BaseObjectTypes.Record, Convert.ToInt64(cont), true);
}
return uri;
}
示例2: CreateNewRMfolder
private static long CreateNewRMfolder(string str4, long classification, Database db)
{
long uri = 0;
Classification objclas = new Classification(db, classification);
long clasUri = objclas.Uri;
RecordType rt = new RecordType(db, 1);
Record r = new Record(rt);
Classification c = new Classification(db, clasUri);
Location lo = new Location(db, 5503);
r.OwnerLocation = lo;
r.SetAssignee(lo);
r.Classification = c;
r.Title = str4;
r.Save();
uri = r.Uri;
return uri;
}
示例3: CreateNewRMSubFolder
private static long CreateNewRMSubFolder(long conturi, string str5, Database db)
{
long uri = 0;
Record rCont = new Record(db, conturi);
RecordType rtsub = new RecordType(db, 5);
Record rsub = new Record(rtsub);
rsub.Title = str5;
rsub.Container = rCont;
rsub.SetAssignee(rCont.Assignee);
rsub.Save();
uri = rsub.Uri;
return uri;
}
示例4: ProcessProperty
static void ProcessProperty(string Name)
{
TrimApplication.Initialize();
using (Database db = new Database())
{
db.Id = "10";
//db.WorkgroupServerName = "https://SCDB98:9443";
db.Connect();
//Console.WriteLine("DB test: " + db.CurrentUser.Name);
//
JsonSerializer s = new JsonSerializer();
try
{
T1Property t1 = null;
using (StreamReader sr = new StreamReader(Name))
{
using (JsonTextReader reader = new JsonTextReader(sr))
{
//T1Integration t1 = new T1Integration();
t1 = (T1Property)s.Deserialize(reader, typeof(T1Property));
}
}
if (t1 != null)
{
FieldDefinition fdPropertyAddress = new FieldDefinition(db, 502);
if (t1.EddieUri == 0)
{
RecordType rt = new RecordType(db, 1);
Record rec = new Record(rt);
FieldDefinition fdPropertyNo = new FieldDefinition(db, 504);
rec.Title = "Property folder - " + t1.PropertyNumber.ToString();
rec.SetFieldValue(fdPropertyNo, new UserFieldValue(t1.PropertyNumber));
rec.SetFieldValue(fdPropertyAddress, new UserFieldValue(t1.PropertyAddress));
Classification c = new Classification(db, 2616);
rec.Classification = c;
Location loc = new Location(db, 43);
rec.SetAssignee(loc);
//rec.assig
rec.Save();
t1.EddieUri = rec.Uri;
t1.EddieRecordUrl = rec.WebURL;
Console.WriteLine("New property record created ok - number: " + rec.Number);
}
else
{
//RecordType rt = new RecordType(db, 2);
Record rec = new Record(db, t1.EddieUri);
//Record cont = new Record(db, t1.lEddieUri);
//rec.Container = cont;
//rec.Title = "Application - " + t1.ApplicationNo;
//if (t1.propertyLoc != null)
//{
// rec.SetDocument(t1.propertyLoc);
//}
rec.SetFieldValue(fdPropertyAddress, new UserFieldValue(t1.PropertyAddress));
rec.Save();
//t1.EddieUri = rec.Uri;
t1.EddieRecordUrl = rec.WebURL;
Console.WriteLine("Property record upgrades - number: " + rec.Number);
}
using (StreamWriter sw = new StreamWriter(pathout + "T1 property - "+t1.PropertyNumber.ToString()+".txt"))
{
using (JsonWriter writer = new JsonTextWriter(sw))
{
s.Serialize(writer, t1);
Console.WriteLine("Property file returned");
}
};
FileInfo f = new FileInfo(Name);
if (f.Exists)
f.Delete();
}
}
catch (Exception exp)
{
Console.WriteLine("Error: " + exp.Message.ToString());
throw;
}
}
}