Ejemplo n.º 1
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)//删除
        {
            ObservableCollection <T_OA_SATISFACTIONREQUIRE> selectItems = GetSelectList();

            if (selectItems != null)
            {
                for (int i = 0; i < dg.SelectedItems.Count; i++)
                {
                    T_OA_SATISFACTIONREQUIRE ent = dg.SelectedItems[i] as T_OA_SATISFACTIONREQUIRE;
                    if (ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
                    {
                        string        Result = "";
                        ComfirmWindow com    = new ComfirmWindow();
                        com.OnSelectionBoxClosed += (obj, result) =>
                        {
                            try { client.Del_SSurveyAppAsync(selectItems); }
                            catch { }
                        };
                        com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result);
                    }
                    else
                    {
                        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTONLYDIDNOSUBMITANDREVIEWTHEDATACANBEDELETEDBY"));
                        return;
                    }
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 2
0
        private void btnAudit_Click(object sender, RoutedEventArgs e)//审核
        {
            ObservableCollection <T_OA_SATISFACTIONREQUIRE> selectItems = GetSelectList();

            if (selectItems != null)
            {
                T_OA_SATISFACTIONREQUIRE ent = dg.SelectedItems[0] as T_OA_SATISFACTIONREQUIRE;
                if (ent.CHECKSTATE == ((int)CheckStates.Approving).ToString() ||
                    ent.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() ||
                    ent.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString())
                {
                    SatisfactionAppChildWindow form = new SatisfactionAppChildWindow(FormTypes.Audit, ent.SATISFACTIONREQUIREID);
                    EntityBrowser browser           = new EntityBrowser(form);
                    browser.FormType         = FormTypes.Audit;
                    browser.MinHeight        = 510;
                    browser.MinWidth         = 650;
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTRECORDNOTOPERATEPLEASEAGAIN"));
                    return;
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 3
0
        private void btnEdit_Click(object sender, RoutedEventArgs e)//修改
        {
            ObservableCollection <T_OA_SATISFACTIONREQUIRE> selectItems = GetSelectList();

            if (selectItems != null)
            {
                T_OA_SATISFACTIONREQUIRE ent = dg.SelectedItems[0] as T_OA_SATISFACTIONREQUIRE;
                if (ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString() || ent.CHECKSTATE == ((int)CheckStates.UnApproved).ToString())
                {
                    SatisfactionAppChildWindow form = new SatisfactionAppChildWindow(FormTypes.Edit, selectItems.FirstOrDefault().SATISFACTIONREQUIREID);
                    EntityBrowser browser           = new EntityBrowser(form);
                    browser.FormType         = FormTypes.Edit;
                    browser.MinHeight        = 510;
                    browser.MinWidth         = 700;
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"));
                    return;
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 4
0
 public int Upd_SSurveyApp(T_OA_SATISFACTIONREQUIRE info)
 {
     using (SatisfactionBll satBll = new SatisfactionBll())
     {
         return(satBll.Upd_SSurveyApp(info));
     }
 }
Ejemplo n.º 5
0
        void Get_SSurveyAppCompleted(object sender, Get_SSurveyAppCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                _survey = e.Result;

                DocDistrbuteClient.GetDocDistrbuteInfosAsync(_survey.SATISFACTIONREQUIREID);

                txtTitle.Text        = _survey.SATISFACTIONTITLE;
                dpStartDate.Text     = Convert.ToDateTime(_survey.STARTDATE).ToShortDateString();
                dpEndDate.Text       = Convert.ToDateTime(_survey.ENDDATE).ToShortDateString();
                cmbWay.SelectedIndex = int.Parse(_survey.WAY);
                ckbOptFlag.IsChecked = _survey.OPTFLAG == "1" ? true : false;
                foreach (T_SYS_DICTIONARY i in cbDepCity.Items)
                {
                    if (i.DICTIONARYID != null && i.DICTIONARYID.Equals(_survey.ANSWERGROUPID))
                    {
                        cbDepCity.SelectedItem = i;
                    }
                }

                RefreshUI(RefreshedTypes.AuditInfo);
                RefreshUI(RefreshedTypes.All);
            }
        }
Ejemplo n.º 6
0
        public int Upd_SSurveyApp(T_OA_SATISFACTIONREQUIRE surveySubjectInfo)
        {
            int n = 0;

            try
            {
                if (surveySubjectInfo.EntityKey == null)
                {
                    surveySubjectInfo.EntityKey = new System.Data.EntityKey("TM_SaaS_OA_EFModelContext.T_OA_SATISFACTIONREQUIRE", "SATISFACTIONREQUIREID", surveySubjectInfo.SATISFACTIONREQUIREID);
                    surveySubjectInfo.T_OA_SATISFACTIONMASTER = base.GetObjectByEntityKey(surveySubjectInfo.T_OA_SATISFACTIONMASTER.EntityKey) as T_OA_SATISFACTIONMASTER;
                    base.Add(surveySubjectInfo);
                }
                else
                {
                    T_OA_SATISFACTIONREQUIRE tmpobj = base.GetObjectByEntityKey(surveySubjectInfo.EntityKey) as T_OA_SATISFACTIONREQUIRE;
                    tmpobj.T_OA_SATISFACTIONMASTER = base.GetObjectByEntityKey(surveySubjectInfo.T_OA_SATISFACTIONMASTERReference.EntityKey) as T_OA_SATISFACTIONMASTER;
                    base.Update(surveySubjectInfo);
                }
                n = SaveContextChanges();
                n = n == 0 ? 1 : n; // 没有任何更新时,SaveChanges会返回0
            }
            catch (Exception ex)
            {
                return(0);

                throw (ex);
            }
            return(n);
        }
Ejemplo n.º 7
0
 private void dg_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     _lst.Clear();
     if (dg.SelectedIndex > -1)
     {
         T_OA_SATISFACTIONREQUIRE vd = dg.SelectedItem as T_OA_SATISFACTIONREQUIRE;
         _lst.Add(vd);
     }
 }
Ejemplo n.º 8
0
 public int Add_SSurveyApp(T_OA_SATISFACTIONREQUIRE info)
 {
     try
     {
         Utility.RefreshEntity(info);
         return(dal.Add(info));
     }
     catch (Exception ex)
     {
         Tracer.Debug("满意度调查SatisfactionBll-Add_SSurveyApp" + System.DateTime.Now.ToString() + " " + ex.ToString());
         return(-1);
     }
 }
Ejemplo n.º 9
0
 // 添加发布对象的修改
 public int Upd_SSurveyApp(T_OA_SATISFACTIONREQUIRE info)
 {
     try
     {
         SatisfactionDal satDal = new SatisfactionDal();
         return(satDal.Upd_SSurveyApp(info));
     }
     catch (Exception ex)
     {
         Tracer.Debug("满意度调查SatisfactionBll-Upd_SSurveyApp" + System.DateTime.Now.ToString() + " " + ex.ToString());
         return(-1);
     }
 }
Ejemplo n.º 10
0
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            _survey = new T_OA_SATISFACTIONREQUIRE();
            _survey.T_OA_SATISFACTIONMASTER = new T_OA_SATISFACTIONMASTER();
            //cbDepCity.SelectedIndex = 0;
            _survey.SATISFACTIONREQUIREID = Guid.NewGuid().ToString();
            _survey.CHECKSTATE            = ((int)CheckStates.UnSubmit).ToString();
            dpStartDate.Text = DateTime.Now.ToShortDateString();
            dpEndDate.Text   = DateTime.Now.AddMonths(3).ToShortDateString();

            RefreshUI(RefreshedTypes.AuditInfo);
            RefreshUI(RefreshedTypes.All);
            SetSurvey();
        }
Ejemplo n.º 11
0
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            _survey = new T_OA_SATISFACTIONREQUIRE();
            _survey.T_OA_SATISFACTIONMASTER = new T_OA_SATISFACTIONMASTER();
            //cbDepCity.SelectedIndex = 0;
            _survey.SATISFACTIONREQUIREID = Guid.NewGuid().ToString();
            _survey.CHECKSTATE = ((int)CheckStates.UnSubmit).ToString();
            dpStartDate.Text = DateTime.Now.ToShortDateString();
            dpEndDate.Text = DateTime.Now.AddMonths(3).ToShortDateString();

            RefreshUI(RefreshedTypes.AuditInfo);
            RefreshUI(RefreshedTypes.All);
            SetSurvey();
        }
Ejemplo n.º 12
0
 public bool Add_SSurveyApp(T_OA_SATISFACTIONREQUIRE info)
 {
     using (SatisfactionBll satBll = new SatisfactionBll())
     {
         int bl = satBll.Add_SSurveyApp(info);
         if (bl == -1)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
Ejemplo n.º 13
0
        private void BtnView_Click(object sender, RoutedEventArgs e)//查看
        {
            ObservableCollection <T_OA_SATISFACTIONREQUIRE> selectItems = GetSelectList();

            if (selectItems != null)
            {
                satisfactionrequire = selectItems.FirstOrDefault();
                SatisfactionAppChildWindow form = new SatisfactionAppChildWindow(FormTypes.Browse, satisfactionrequire.SATISFACTIONREQUIREID);
                EntityBrowser browser           = new EntityBrowser(form);
                browser.FormType         = FormTypes.Browse;
                browser.MinHeight        = 510;
                browser.MinWidth         = 650;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 14
0
        //参与调查
        private void btnSurveyDetail_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection <V_MyStaticfaction> selectEmpSurveyList = GetSelectList();

            if (selectEmpSurveyList != null)
            {
                T_OA_SATISFACTIONREQUIRE empSurveysInfo = selectEmpSurveyList[0].OARequire;
                if (empSurveysInfo != null)
                {
                    if (empSurveysInfo.CHECKSTATE == "0")
                    {
                        ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("WARING"), Utility.GetResourceStr("NOSUBMISSIONMEETING"), Utility.GetResourceStr("CONFIRMBUTTON"));
                        return;
                    }
                    DateTime DtNow = System.DateTime.Now;
                    if (empSurveysInfo.ENDDATE < DtNow)
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("WARING"), Utility.GetResourceStr("STATICFACTIONISENDYOUCANVISIST"));//调查已经过期,不能参与调查
                        return;
                    }
                    //if()
                    Satisfaction_0 frmEmpSurveysSubmit = new Satisfaction_0();//empSurveysInfo
                    empSurveysInfo.T_OA_SATISFACTIONMASTER = selectEmpSurveyList[0].OAMaster;
                    frmEmpSurveysSubmit.Require            = empSurveysInfo;
                    EntityBrowser browser = new EntityBrowser(frmEmpSurveysSubmit);
                    browser.MinHeight        = 500;
                    browser.MinWidth         = 750;
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
                }
            }
            else
            {
                ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ShowDetail"), Utility.GetResourceStr("CONFIRMBUTTON"));
            }
        }
Ejemplo n.º 15
0
 public bool Add_SSurveyApp(T_OA_SATISFACTIONREQUIRE info)
 {
     using (SatisfactionBll satBll = new SatisfactionBll())
     {
         int bl = satBll.Add_SSurveyApp(info);
         if (bl == -1)
         {
             return false;
         }
         else
         {
             return true;
         }
     }
 }
Ejemplo n.º 16
0
        /// <summary>
        /// 根据传回的XML,添加员工满意度调查申请表
        /// </summary>
        /// <param name="master"></param>
        private static string EmployeeSatisfactionRequireAdd(IEnumerable<XElement> eGFunc)
        {
            return "";
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return "";
                }
                string strEmployeeID = string.Empty;
                string strOwnerID = string.Empty;
                string strOwnerPostID = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                        case "CREATEUSERID":
                            strEmployeeID = q.Attribute("Value").Value;
                            break;
                        case "OWNERID":
                            strOwnerID = q.Attribute("Value").Value;
                            break;
                        case "OWNERPOSTID":
                            strOwnerPostID = q.Attribute("Value").Value;
                            break;
                        case "OWNERDEPARTMENTID":
                            strOwnerDepartmentID = q.Attribute("Value").Value;
                            break;
                        case "OWNERCOMPANYID":
                            strOwnerCompanyID = q.Attribute("Value").Value;
                            break;
                    }
                }

                string employeeid = strEmployeeID.Replace("{", "").Replace("}", "");

                List<T_OA_SATISFACTIONREQUIRE> lm = new List<T_OA_SATISFACTIONREQUIRE>();
                T_OA_SATISFACTIONREQUIRE entity = new T_OA_SATISFACTIONREQUIRE();

                entity.SATISFACTIONREQUIREID = Guid.NewGuid().ToString();
                entity.CREATEDATE = DateTime.Now;
                entity.OWNERID = strOwnerID;
                entity.OWNERPOSTID = strOwnerPostID;
                entity.OWNERDEPARTMENTID = strOwnerDepartmentID;
                entity.OWNERCOMPANYID = strOwnerCompanyID;
                entity.CREATEUSERID = strOwnerID;
                entity.CREATEPOSTID = strOwnerPostID;
                entity.CREATEDEPARTMENTID = strOwnerDepartmentID;
                entity.CREATECOMPANYID = strOwnerCompanyID;
                lm.Add(entity);

                SmtOAPersonOffice requireBll = new SmtOAPersonOffice();
                bool bl = false;
                bl = requireBll.Add_SSurveyApp(entity);
                if (bl == true)
                {
                    return entity.SATISFACTIONREQUIREID;
                }
                else
                {
                    string err = "Error";
                    return err;
                }
            }
            catch (Exception e)
            {
                string abc = "<OA>Message=[" + e.Message + "]" + "<OA>Source=[" + e.Source + "]<OA>StackTrace=[" + e.StackTrace + "]<OA>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return abc;
            }
        }
Ejemplo n.º 17
0
 private void BtnView_Click(object sender, RoutedEventArgs e)//查看
 {
     ObservableCollection<T_OA_SATISFACTIONREQUIRE> selectItems = GetSelectList();
     if (selectItems != null)
     {
         satisfactionrequire = selectItems.FirstOrDefault();
         SatisfactionAppChildWindow form = new SatisfactionAppChildWindow(FormTypes.Browse, satisfactionrequire.SATISFACTIONREQUIREID);
         EntityBrowser browser = new EntityBrowser(form);
         browser.FormType = FormTypes.Browse;
         browser.MinHeight = 510;
         browser.MinWidth = 650;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
     }
     else
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON"));
 }
Ejemplo n.º 18
0
        void Get_SSurveyAppCompleted(object sender, Get_SSurveyAppCompletedEventArgs e)
        {
            if (e.Result != null)
            {
                _survey = e.Result;

                DocDistrbuteClient.GetDocDistrbuteInfosAsync(_survey.SATISFACTIONREQUIREID);

                txtTitle.Text = _survey.SATISFACTIONTITLE;
                dpStartDate.Text = Convert.ToDateTime(_survey.STARTDATE).ToShortDateString();
                dpEndDate.Text = Convert.ToDateTime(_survey.ENDDATE).ToShortDateString();
                cmbWay.SelectedIndex = int.Parse(_survey.WAY);
                ckbOptFlag.IsChecked = _survey.OPTFLAG == "1" ? true : false;
                foreach (T_SYS_DICTIONARY i in cbDepCity.Items)
                    if (i.DICTIONARYID != null && i.DICTIONARYID.Equals(_survey.ANSWERGROUPID))
                        cbDepCity.SelectedItem = i;

                RefreshUI(RefreshedTypes.AuditInfo);
                RefreshUI(RefreshedTypes.All);
            }
        }
Ejemplo n.º 19
0
 public int Upd_SSurveyApp(T_OA_SATISFACTIONREQUIRE info)
 {
     using (SatisfactionBll satBll = new SatisfactionBll())
     {
         return satBll.Upd_SSurveyApp(info);
     }
 }