コード例 #1
0
 private void FormMain_FormClosed(object sender, FormClosedEventArgs e)
 {
     using (ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient srv = new ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient())
     {
         var user = srv.PW_User_GetOneByUserID(FormLogin.user.ID);
         user.ISLOGININ = "N";
         srv.PW_User_UpdateUserInfo(user);
     }
     Environment.Exit(0);
 }
コード例 #2
0
ファイル: FormPlaceMain.cs プロジェクト: wpmyj/TCPWCS_Project
 /// <summary>
 /// 刷新DataGridview数据
 /// </summary>
 private void BindingDGVPlaces()
 {
     dGVPlaceInfo.DataSource = null;
     using (ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient srv = new ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient())
     {
         try
         {
             lst = srv.PL_PLACE_GetAll().ToList();
             dGVPlaceInfo.DataSource = lst;
         }
         catch (Exception)
         {
             dGVPlaceInfo.DataSource = null;
         }
     }
 }
コード例 #3
0
 private void btn_r_SaveDesc_Click(object sender, EventArgs e)
 {
     if (tb_r_GroupName.Text.Trim() == "")
     {
         return;
     }
     using (ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient srv = new ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient())
     {
         PW_GROUP newGroup = new PW_GROUP();
         newGroup.ID            = Guid.NewGuid().ToString();
         newGroup.GROUPDESCRIBE = rTB_r_GroupDesc.Text;
         newGroup.GROUPNAME     = tb_r_GroupName.Text;
         if (srv.PW_Group_InsertOne(newGroup))
         {
             MessageBox.Show(this, "保存成功!");
             Close();
         }
         else
         {
             MessageBox.Show(this, "保存失败!");
         }
     }
 }
コード例 #4
0
ファイル: FormPlaceMain.cs プロジェクト: wpmyj/TCPWCS_Project
 private void btn_Edit_Click(object sender, EventArgs e)
 {
     if (dGVPlaceInfo.SelectedRows.Count > 0)
     {
         ASRS_Volvo.ServiceForVolvo.PL_Place placeOne = new ASRS_Volvo.ServiceForVolvo.PL_Place();
         using (ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient srv = new ASRS_Volvo.ServiceForVolvo.ASRS_ServiceSoapClient())
         {
             for (int i = 0; i < dGVPlaceInfo.RowCount; i++)
             {
                 placeOne.PLACEID = dGVPlaceInfo.Rows[i].Cells["PLACEID"].Value.ToString();
                 placeOne         = srv.PL_PLACE_GetPlaceInfoByID(placeOne.PLACEID)[0];
                 if (dGVPlaceInfo.Rows[i].Cells["ISLOCK"].Value.ToString() == "1")
                 {
                     placeOne.ISLOCK = "1";
                 }
                 else
                 {
                     placeOne.ISLOCK = "0";
                 }
                 srv.PL_PLACE_UpdateNew(placeOne);
             }
         }
     }
 }