コード例 #1
0
 partial void UpdateCompanyField(CompanyField instance);
コード例 #2
0
 partial void DeleteCompanyField(CompanyField instance);
コード例 #3
0
 partial void InsertCompanyField(CompanyField instance);
コード例 #4
0
        public void ShowCmdWindow(string cmd, int lscId, string projId)
        {
            try {
                WLscsComboBox.Disabled  = false;
                ProjectIdField.Disabled = false;
                ProjectIdField.Clear();
                ProjNameField.Clear();
                StartTimeField.Clear();
                EndTimeField.Clear();
                ResponsibleField.Clear();
                PhoneField.Clear();
                CompanyField.Clear();
                CommentField.Clear();
                EnabledCheckbox.Checked = true;
                TipsStatusBar.ClearStatus();

                switch (cmd)
                {
                case "Add":
                    ProjectWindow.Title = "新增工程";
                    ProjectWindow.Icon  = Icon.TagBlueAdd;
                    WLscsComboBox.GetStore().DataBind();
                    ProjectIdField.Text    = Guid.NewGuid().ToString("D").ToUpper();
                    StartTimeField.Text    = WebUtility.GetDateString(DateTime.Today);
                    EndTimeField.Text      = WebUtility.GetDateString(DateTime.Today.AddMonths(1).AddSeconds(-1));
                    OperationWindowHF.Text = "Add";
                    ProjectWindow.Show();
                    break;

                case "Edit":
                    ProjectWindow.Title     = "编辑工程";
                    ProjectWindow.Icon      = Icon.TagBlueEdit;
                    WLscsComboBox.Disabled  = true;
                    ProjectIdField.Disabled = true;
                    OperationWindowHF.Text  = "Edit";

                    var lsc = new BLsc().GetLsc(lscId);
                    if (lsc == null)
                    {
                        WebUtility.ShowMessage(EnmErrType.Warning, "无法获取Lsc信息");
                        return;
                    }

                    var connectionString = WebUtility.CreateLscConnectionString(lsc);
                    var project          = new BAppointment().GetProject(lsc.LscID, lsc.LscName, projId, connectionString);
                    if (project == null)
                    {
                        WebUtility.ShowMessage(EnmErrType.Warning, "无法获取工程信息");
                        return;
                    }

                    WLscsComboBox.SetValueAndFireSelect(lsc.LscID);
                    ProjectIdField.Text     = project.ProjectId;
                    ProjNameField.Text      = project.ProjectName;
                    StartTimeField.Text     = WebUtility.GetDateString(project.BeginTime);
                    EndTimeField.Text       = WebUtility.GetDateString(project.EndTime);
                    ResponsibleField.Text   = project.Responsible;
                    PhoneField.Text         = project.ContactPhone;
                    CompanyField.Text       = project.Company;
                    CommentField.Text       = project.Comment;
                    EnabledCheckbox.Checked = project.Enabled;
                    ProjectWindow.Show();
                    break;

                case "Del":
                    X.Msg.Confirm("确认对话框", "您确定要删除吗?", new MessageBoxButtonsConfig {
                        Yes = new MessageBoxButtonConfig {
                            Handler = String.Format(@"
                                X.ProjectManager.Delete({0},'{1}',{{
                                success: function(result) {{
                                    MainGridPagingToolbar.doRefresh();
                                }},
                                eventMask: {{
                                    showMask: true,
                                    target: 'customtarget',
                                    msg: '正在删除中...',
                                    customTarget: MainGridPanel.body.up('div')
                                }}}});", lscId, projId),
                            Text    = "确定"
                        },
                        No = new MessageBoxButtonConfig {
                            Text = "取消"
                        }
                    }).Show();
                    break;

                default:
                    break;
                }
            } catch (Exception err) {
                WebUtility.WriteLog(EnmSysLogLevel.Error, EnmSysLogType.Exception, err.ToString(), Page.User.Identity.Name);
                WebUtility.ShowMessage(EnmErrType.Error, err.Message);
            }
        }
コード例 #5
0
 public void EnterCompanyField(string company)
 {
     CompanyField.SendKeys(company);
 }
コード例 #6
0
 public void ClickCompanyField()
 {
     CompanyField.Click();
 }
コード例 #7
0
 public void ClearCompanyField()
 {
     CompanyField.Clear();
 }