コード例 #1
0
 ///<summary></summary>
 public static long Insert(ConnGroupAttach connGroupAttach)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         connGroupAttach.ConnGroupAttachNum = Meth.GetLong(MethodBase.GetCurrentMethod(), connGroupAttach);
         return(connGroupAttach.ConnGroupAttachNum);
     }
     return(Crud.ConnGroupAttachCrud.Insert(connGroupAttach));
 }
コード例 #2
0
 ///<summary></summary>
 public static void Update(ConnGroupAttach connGroupAttach)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), connGroupAttach);
         return;
     }
     Crud.ConnGroupAttachCrud.Update(connGroupAttach);
 }
コード例 #3
0
        ///<summary></summary>
        public static void Attach(long centralConnectionNum, long connectionGroupNum)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), centralConnectionNum, connectionGroupNum);
                return;
            }
            ConnGroupAttach connGroupAttach = new ConnGroupAttach();

            connGroupAttach.CentralConnectionNum = centralConnectionNum;
            connGroupAttach.ConnectionGroupNum   = connectionGroupNum;
            Crud.ConnGroupAttachCrud.Insert(connGroupAttach);
        }
コード例 #4
0
		private void butOK_Click(object sender,EventArgs e) {
			//Sync groupattaches for this group prior to leaving this window.  Updating the ConnectionGroup list in parent window is taken care of there.
			if(textDescription.Text=="") {
				MessageBox.Show(Lans.g(this,"Please enter something for the description."));
				return;
			}
			ConnectionGroupCur.Description=textDescription.Text;
			//Does each connection have a group attach?  If not, create one.
			for(int i=0;i<_listConnsCur.Count;i++) {
				bool isFound=false;
				for(int j=0;j<_listConnGroupAttaches.Count;j++) {
					if(_listConnsCur[i].CentralConnectionNum==_listConnGroupAttaches[j].CentralConnectionNum) {
						isFound=true;
						break;
					}
				}
				if(!isFound) {
					ConnGroupAttach connGA=new ConnGroupAttach();
					connGA.CentralConnectionNum=_listConnsCur[i].CentralConnectionNum;
					connGA.ConnectionGroupNum=ConnectionGroupCur.ConnectionGroupNum;
					_listConnGroupAttaches.Add(connGA);
				}
			}
			//Does each group attach have a connection?  If not, remove the attach.
			for(int i=_listConnGroupAttaches.Count-1;i>=0;i--) {
				bool isFound=false;
				for(int j=0;j<_listConnsCur.Count;j++) {
					if(_listConnGroupAttaches[i].CentralConnectionNum==_listConnsCur[j].CentralConnectionNum) {
						isFound=true;
						break;
					}
				}
				if(!isFound) {
					_listConnGroupAttaches.RemoveAt(i);
				}
			}
			//_listConnGroupAttaches now directly reflects what is shown in the UI, without creating duplicates.
			ConnGroupAttaches.Sync(_listConnGroupAttaches,ConnectionGroupCur.ConnectionGroupNum);
			DialogResult=DialogResult.OK;
		}
コード例 #5
0
ファイル: ConnGroupAttaches.cs プロジェクト: mnisl/OD
		///<summary></summary>
		public static void Update(ConnGroupAttach connGroupAttach){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				Meth.GetVoid(MethodBase.GetCurrentMethod(),connGroupAttach);
				return;
			}
			Crud.ConnGroupAttachCrud.Update(connGroupAttach);
		}
コード例 #6
0
ファイル: ConnGroupAttaches.cs プロジェクト: mnisl/OD
		///<summary></summary>
		public static long Insert(ConnGroupAttach connGroupAttach){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb){
				connGroupAttach.ConnGroupAttachNum=Meth.GetLong(MethodBase.GetCurrentMethod(),connGroupAttach);
				return connGroupAttach.ConnGroupAttachNum;
			}
			return Crud.ConnGroupAttachCrud.Insert(connGroupAttach);
		}