Exemple #1
0
        /// <summary>
        /// silme işlemi yapar
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSil_Click(object sender, EventArgs e)
        {
            if (selectedData != null)
            {
                if (Messaging.DialogExamMessage(Messaging.msg_silmeIslemiSoru))
                {
                    Request <Polyclinic, bool> request = new Request <Polyclinic, bool>();
                    request.MethodName = "DeletePolyclinic";
                    object[] vs = new object[1];
                    vs[0] = selectedData;
                    var response = request.Execute(vs);
                    if (!response.Success)
                    {
                        Common.WriteLog("database", "poliklinik kaydı silinemedi.");
                        Messaging.DialogErrorMessage(Messaging.msg_silmeHata + response.ErrorMessage);
                        return;
                    }

                    Messaging.DialogInfoMessage(Messaging.msg_silmeOk);
                }
            }
            else
            {
                Messaging.DialogWarningMessage(Messaging.msg_selectRecordWarning);
            }
        }
 /// <summary>
 /// git >
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnGit_Click(object sender, EventArgs e)
 {
     if (cmbOncekiIslemleri.SelectedIndex != -1)
     {
         if (Common.TaburcuTxt == transfers.Find(x =>
                                                 x.DosyaNo == patient.DosyaNo &&
                                                 x.YapilanIslem == selectedOperation.IslemAdi)
             .Taburcu)
         {
             Messaging.DialogInfoMessage("Hasta bu sevkten taburcu edilmiş.");
         }
         dtgTahliller.DataSource = transfers;
     }
 }
Exemple #3
0
        /// <summary>
        /// yeni ekler
        /// </summary>
        private void SavePatient()
        {
            var request = new Request <Patient, bool>();

            request.DataContract = patient;
            request.MethodName   = "UpdatePatient";

            var response = request.Execute(patient);

            if (!response.Success)
            {
                Messaging.DialogErrorMessage("Kayıt hatası" + response.ErrorMessage);
                return;
            }

            Messaging.DialogInfoMessage(Messaging.msg_kayıtOk);
        }
Exemple #4
0
        /// <summary>
        /// kaydetme işlemi
        /// </summary>
        private void SaveCommand()
        {
            var request = new Request <Discharged, bool>();

            request.MethodName = "InsertDischarged";

            var response = request.Execute(dataContract);

            if (!response.Success)
            {
                Messaging.DialogErrorMessage(Messaging.msg_kayıtHata);
                return;
            }

            Messaging.DialogInfoMessage("Çıkış işlemi kaydedildi.");
            this.Close();
        }
        /// <summary>
        /// kullanıcı güncelle
        /// </summary>
        private void UdateUser()
        {
            var request = new Request <User, bool>();

            request.MethodName = "UpdateUser";
            object[] o = new object[1];
            o[0] = updateUser;

            var response = request.Execute(o);

            if (!response.Success)
            {
                Messaging.DialogErrorMessage(response.ErrorMessage);
                return;
            }

            Messaging.DialogInfoMessage(Messaging.msg_güncellemeOk);
        }
        /// <summary>
        /// kullanıcıyı kaydet
        /// </summary>
        private void SaveUser()
        {
            var request = new Request <User, bool>();

            request.MethodName = "InsertUser";
            object[] o = new object[1];
            o[0] = data;

            var response = request.Execute(o);

            if (!response.Success)
            {
                Messaging.DialogErrorMessage(response.ErrorMessage);
                return;
            }

            Messaging.DialogInfoMessage(Messaging.msg_kayıtOk);
        }
        /// <summary>
        /// seçili kaydı sler
        /// </summary>
        private void DeleteSelectedTransfer()
        {
            if (SelectedDataGridTransfer != null)
            {
                if (!Messaging.DialogExamMessage("Seçili kayıt silinsin mi?"))
                {
                    return;
                }
                var request = new Request <Transfer, bool>();
                request.MethodName   = "DeleteTransfer";
                request.DataContract = SelectedDataGridTransfer;

                var response = request.Execute(selectedOperation);
                if (!response.Success)
                {
                    Messaging.DialogErrorMessage(response.ErrorMessage);
                    return;
                }

                Messaging.DialogInfoMessage(Messaging.msg_silmeOk);
            }
        }
        /// <summary>
        /// sil
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSil_Click(object sender, EventArgs e)
        {
            if (Common.SpaceControl(txtKullaniciKodu.Text))
            {
                if (Messaging.DialogExamMessage(Messaging.msg_silmeIslemiSoru))
                {
                    var request = new Request <User, bool>();
                    request.MethodName = "DeleteUser";
                    User user = new User {
                        Kodu = Convert.ToInt32(txtKullaniciKodu.Text)
                    };
                    var response = request.Execute(user);
                    if (!response.Success)
                    {
                        Messaging.DialogErrorMessage(Messaging.msg_silmeHata + response.ErrorMessage);
                        return;
                    }

                    Messaging.DialogInfoMessage(Messaging.msg_silmeOk);
                }
            }
        }
Exemple #9
0
        /// <summary>
        /// poliklinik güncelleme/kaydetme
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            if (isUpdate)
            {
                Request <Polyclinic, bool> request = new Request <Polyclinic, bool>();
                request.MethodName = "UpdatePolyclinic";

                var response = request.Execute(selectedData);
                if (!response.Success)
                {
                    Common.WriteLog("database", "poliklinik kaydı yapılamadı.");
                    Messaging.DialogErrorMessage(Messaging.msg_güncellemeHata);
                    return;
                }

                Messaging.DialogInfoMessage(Messaging.msg_güncellemeOk);
            }
            else
            {
                var request = new Request <Polyclinic, bool>();
                request.MethodName = "InsertPolyclinic";

                var response = request.Execute(new Polyclinic
                {
                    PoliklinikAdi = cmb_policlinic.Text,
                    Aciklama      = txtAciklama.Text,
                    Durum         = (cbx_gecerli.CheckState == CheckState.Checked) ? Common.PolyclinicStatusAktif : Common.PolyclinicStatusPasif
                });

                if (!response.Success)
                {
                    Messaging.DialogErrorMessage(Messaging.msg_kayıtHata);
                    return;
                }

                Messaging.DialogInfoMessage(Messaging.msg_kayıtOk);
            }
        }