protected void ctlProgramSearchLookupPopupCaller_NotifyPopupResult(object sender, string action, string value)
        {
            if (action != "ok")
            {
                return;
            }

            object returnValue = new object();

            string[]            listID      = value.Split('|');
            IList <ProgramLang> programList = new List <ProgramLang>();

            foreach (string id in listID)
            {
                SuProgramLang programlang = SuProgramLangService.FindByIdentity(UIHelper.ParseLong(id));
                if (programlang != null)
                {
                    ProgramLang pl = new ProgramLang();
                    pl.ProgramId     = programlang.ProgramId;
                    pl.ProgramLangId = programlang.Id;
                    pl.ProgramName   = programlang.ProgramsName;
                    pl.Comment       = programlang.Comment;

                    programList.Add(pl);
                }
            }
            returnValue = programList;
            CallOnObjectLookUpReturn(returnValue);
        }
예제 #2
0
        protected void ctlSubmit_Click(object sender, EventArgs e)
        {
            IList <SuProgramLang> programLangList = new List <SuProgramLang>();

            SuProgram program = new SuProgram(UIHelper.ParseShort(ctlProgramGrid.SelectedValue.ToString()));

            foreach (GridViewRow row in ctlProgramLanguageGrid.Rows)
            {
                TextBox  ctlProgramName = (TextBox)ctlProgramLanguageGrid.Rows[row.RowIndex].FindControl("ctlProgramName");
                TextBox  ctlComment     = (TextBox)ctlProgramLanguageGrid.Rows[row.RowIndex].FindControl("ctlComment");
                CheckBox ctlActiveChk   = (CheckBox)ctlProgramLanguageGrid.Rows[row.RowIndex].FindControl("ctlActive");
                if (!string.IsNullOrEmpty(ctlProgramName.Text) || !string.IsNullOrEmpty(ctlComment.Text))
                {
                    SuProgramLang programLang = new SuProgramLang();
                    DbLanguage    Lang        = new DbLanguage(UIHelper.ParseShort(ctlProgramLanguageGrid.DataKeys[row.RowIndex].Value.ToString()));
                    programLang.Language     = Lang;
                    programLang.Program      = program;
                    programLang.ProgramsName = ctlProgramName.Text;
                    programLang.Comment      = ctlComment.Text;
                    programLang.Active       = ctlActiveChk.Checked;
                    programLang.CreBy        = UserAccount.UserID;
                    programLang.CreDate      = DateTime.Now;
                    programLang.UpdBy        = UserAccount.UserID;
                    programLang.UpdDate      = DateTime.Now;
                    programLang.UpdPgm       = ProgramCode;
                    programLangList.Add(programLang);
                }
            }
            SuProgramLangService.UpdateProgramLang(programLangList);
            ctlMessage.Message = GetMessage("SaveSuccessFully");
        }
예제 #3
0
        public int RequestCount()
        {
            SuProgramLang suProgramLang = new SuProgramLang();

            suProgramLang.ProgramsName = txtCompanyName.Text;
            int count = SuProgramLangService.CountBySuProgramLangCriteria(suProgramLang, UIHelper.ParseShort(RoleId), UserAccount.CurrentLanguageID);

            return(count);
        }
예제 #4
0
        public Object RequestData(int startRow, int pageSize, string sortExpression)
        {
            SuProgramLang suProgramLang = new SuProgramLang();

            suProgramLang.ProgramsName = txtCompanyName.Text;

            IList <ProgramLang> list = SuProgramLangService.FindBySuProgramLangQuery(suProgramLang, UIHelper.ParseShort(RoleId), UserAccount.CurrentLanguageID, startRow, pageSize, sortExpression);

            return(list);
        }