Example #1
0
        public void RefreshPayrollList()
        {
            try {
                EmpListGRD.DataSource = Payroll.GetGuardsPayrollMinimal();
                if (EmpListGRD.RowCount > 0)
                {
                    _currentRow = EmpListGRD.Rows[0];
                    EmpListGRD.Columns[0].Visible = false;
                    EmpListGRD.Columns[1].Width   = 320;
                    EmpListGRD.Sort(EmpListGRD.Columns[1], ListSortDirection.Ascending);

                    foreach (DataGridViewRow row in EmpListGRD.Rows)
                    {
                        if (row.Cells[0].Value.ToString().Equals(Gid.ToString()))
                        {
                            row.Selected = true;
                            _currentRow  = row;
                            row.DefaultCellStyle.Font = new Font("Segoe UI", 12, FontStyle.Bold);
                            if (row.Index > 4)
                            {
                                EmpListGRD.FirstDisplayedScrollingRowIndex = row.Index - 4;
                            }
                            else
                            {
                                EmpListGRD.FirstDisplayedScrollingRowIndex = 0;
                            }
                            break;
                        }
                    }
                }
            }
            catch (Exception ex) {
                ShowErrorBox("Payroll Employee List", ex.Message);
            }
        }
 public override int GetHashCode()
 {
     return(Gid.GetHashCode()
            ^ ListId.GetHashCode()
            ^ LinkId.GetHashCode()
            ^ Url.GetHashCode());
 }
Example #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Uid.Length != 0)
            {
                hash ^= Uid.GetHashCode();
            }
            if (Gid != 0)
            {
                hash ^= Gid.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Price != 0)
            {
                hash ^= Price.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Primary != false)
            {
                hash ^= Primary.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Uid != 0L)
            {
                hash ^= Uid.GetHashCode();
            }
            if (Gid != 0L)
            {
                hash ^= Gid.GetHashCode();
            }
            if (HomeDirectory.Length != 0)
            {
                hash ^= HomeDirectory.GetHashCode();
            }
            if (Shell.Length != 0)
            {
                hash ^= Shell.GetHashCode();
            }
            if (Gecos.Length != 0)
            {
                hash ^= Gecos.GetHashCode();
            }
            if (SystemId.Length != 0)
            {
                hash ^= SystemId.GetHashCode();
            }
            if (AccountId.Length != 0)
            {
                hash ^= AccountId.GetHashCode();
            }
            if (OperatingSystemType != global::Google.Cloud.OsLogin.Common.OperatingSystemType.Unspecified)
            {
                hash ^= OperatingSystemType.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #5
0
 public override int GetHashCode() {
   int hash = 1;
   if (HasUri) hash ^= Uri.GetHashCode();
   if (HasUid) hash ^= Uid.GetHashCode();
   if (HasGid) hash ^= Gid.GetHashCode();
   hash ^= Metadata.GetHashCode();
   if (_unknownFields != null) {
     hash ^= _unknownFields.GetHashCode();
   }
   return hash;
 }
Example #6
0
        /// <inheritdoc />
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            if (Gid == 0)
            {
                throw new MissingRequiredAttribute("Gid", Gid);
            }

            writer.AddAttribute("gid", Gid.ToString(CultureInfo.InvariantCulture));

            base.AddAttributesToRender(writer);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Gid != 0UL)
            {
                hash ^= Gid.GetHashCode();
            }
            if (TeamId != 0)
            {
                hash ^= TeamId.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Gid != 0UL)
            {
                hash ^= Gid.GetHashCode();
            }
            if (Team != 0)
            {
                hash ^= Team.GetHashCode();
            }
            hash ^= applicant_.GetHashCode();
            hash ^= handle_.GetHashCode();
            return(hash);
        }
Example #9
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Primary != false)
            {
                hash ^= Primary.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Uid != 0L)
            {
                hash ^= Uid.GetHashCode();
            }
            if (Gid != 0L)
            {
                hash ^= Gid.GetHashCode();
            }
            if (HomeDirectory.Length != 0)
            {
                hash ^= HomeDirectory.GetHashCode();
            }
            if (Shell.Length != 0)
            {
                hash ^= Shell.GetHashCode();
            }
            if (Gecos.Length != 0)
            {
                hash ^= Gecos.GetHashCode();
            }
            if (SystemId.Length != 0)
            {
                hash ^= SystemId.GetHashCode();
            }
            if (AccountId.Length != 0)
            {
                hash ^= AccountId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Gid != 0UL)
            {
                hash ^= Gid.GetHashCode();
            }
            if (Targetid != 0)
            {
                hash ^= Targetid.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            return(hash);
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Gid != 0UL)
            {
                hash ^= Gid.GetHashCode();
            }
            if (Icon != 0)
            {
                hash ^= Icon.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            return(hash);
        }
Example #12
0
        /// <inheritdoc />
        protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

            if (Gid == 0)
            {
                throw new MissingRequiredAttribute("Gid", Gid);
            }
            writer.AddAttribute("gid", Gid.ToString(CultureInfo.InvariantCulture));
            if (Uid != 0)
            {
                writer.AddAttribute("uid", Uid.ToString(CultureInfo.InvariantCulture));
            }
            if (_role != GroupMembershipRole.Member)
            {
                writer.AddAttribute("role", _role.ToString().ToLowerInvariant());
            }
        }
Example #13
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Size.GetHashCode();
         hashCode = (hashCode * 397) ^ Type.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Dev;
         hashCode = (hashCode * 397) ^ (Qid?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (int)Mode;
         hashCode = (hashCode * 397) ^ (int)Atime;
         hashCode = (hashCode * 397) ^ (int)Mtime;
         hashCode = (hashCode * 397) ^ Length.GetHashCode();
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Uid?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Gid?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Muid?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
        private void Load()
        {
            PropertiesView.Clear();

            if (string.IsNullOrEmpty(Gid))
            {
                MessageBox.Show("You first have to enter GID", "Warning", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            try
            {
                if (Gid.StartsWith("0x", StringComparison.Ordinal))
                {
                    var NewGid = Gid.Remove(0, 2);

                    g = Convert.ToInt64(Int64.Parse(NewGid, System.Globalization.NumberStyles.HexNumber));
                }
                else
                {
                    g = Convert.ToInt64(Gid);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("You entered invalid GID", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            try
            {
                short            type       = ModelCodeHelper.ExtractTypeFromGlobalId(g);
                List <ModelCode> properties = modelResourcesDesc.GetAllPropertyIds((DMSType)type);
                foreach (var v in properties)
                {
                    PropertiesView.Add(new PopertyView(v.ToString(), true)); //popuni sa svim propertijima i da su svi cekirani
                }
            }
            catch (Exception)
            {
                // ignored
            }
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (Gid != 0UL)
            {
                hash ^= Gid.GetHashCode();
            }
            if (ChannelId != 0)
            {
                hash ^= ChannelId.GetHashCode();
            }
            if (SText.Length != 0)
            {
                hash ^= SText.GetHashCode();
            }
            if (Time != 0UL)
            {
                hash ^= Time.GetHashCode();
            }
            return(hash);
        }
 public override int GetHashCode()
 {
     return(Gid.GetHashCode() + Flags.GetHashCode());
 }
Example #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_UserInfo mu = buser.GetLogin();
         if (Mid < 1 && mu.IsNull)
         {
             function.WriteErrMsg("你尚未指定站点信息");
         }
         else if (Mid < 1)//未指定但已登录,进入用户自己的站点
         {
             mbMod = mbBll.SelModelByUid(mu.UserID);
             if (mbMod == null)
             {
                 Response.Redirect("newsite.aspx");
             }
             else
             {
                 Response.Redirect("/design/mobile/default.aspx?id=" + mbMod.ID);
             }
         }
         else //正常浏览站点
         {
             mbMod = mbBll.SelReturnModel(Mid);
             if (mbMod == null)
             {
                 function.WriteErrMsg("站点不存在");
             }
             //----用于微信分享
             Title_L.Text       = mbMod.SiteName + "-来自[" + mu.TrueName + "]的微站";
             Share_Img.ImageUrl = string.IsNullOrEmpty(mbMod.SiteImg) ? "/design/mobile/tlp/" + mbMod.TlpID + "/view.jpg" : mbMod.SiteImg;
             //----需要加载的通用页面资源,版本更新刷新缓存
             string version = DateTime.Now.Millisecond.ToString();
             string cssres  = "<link href=\"/design/JS/mobile/tools.css?v=" + version + "\" rel=\"stylesheet\" />"
                              + "<link href=\"/design/JS/sui/css/sm.min.css\" rel=\"stylesheet\" />";
             string jsres = "<script src=\"/JS/Plugs/angular.min.js\"></script>"
                            + "<script src=\"/JS/Controls/ZL_Webup.js?v=" + version + "\"></script>"
                            + "<script src=\"/JS/Modal/APIResult.js\"></script>"
                            + "<script src=\"/design/h5/js/zepto.min.js\"></script>"
                            + "<script src=\"/design/JS/sui/js/sm.js\"></script>"
                            + "<script src=\"/design/JS/mobile/tools.js?v=" + version + "\"></script>";
             //----根据网站绑定的模板,加载指定页面
             string html = ReadHtml(mbMod);
             html          = html.Replace("{$site}", Mid.ToString()).Replace("{$gid}", Gid.ToString());
             html          = cssres + jsres + html;//资源置顶
             Html_Lit.Text = html;
             //----配置信息,后期可扩展其他功能
             SiteCfg cfg = new SiteCfg();
             cfg.mid = Mid;
             //直接进入,并且未强制指定为编辑模式
             if (Request.UrlReferrer == null && !(Request["action"] ?? "").Equals("edit"))
             {
             }
             else if (mbMod.UserID == mu.UserID)
             {
                 cfg.edit = true; btns_wrap.Visible = true; pop_div.Visible = true;
             }
             sitecfg_hid.Value = JsonConvert.SerializeObject(cfg);
         }
     }
 }
Example #18
0
        public IEnumerable <string> GetCodeItems(OptionPreference preferLongNames = OptionPreference.Short)
        {
            // -l, --no-log-init: Do not add the user to the lastlog and faillog databases.
            if ((Flags & UserAddFlags.NoLogInit) != 0)
            {
                yield return(preferLongNames == OptionPreference.Long ? "--no-log-init" : "-l");
            }
            // -m, --create-home: Create the user's home directory if it does not exist.
            if ((Flags & UserAddFlags.CreateHome) != 0)
            {
                yield return(preferLongNames == OptionPreference.Long ? "--create-home" : "-m");
            }
            // -M: Do not create the user's home directory, even if the system wide setting from /etc/login.defs (CREATE_HOME) is set to yes.
            if ((Flags & UserAddFlags.DoNotCreateHomeDirectory) != 0)
            {
                yield return("-M");
            }
            // -N, --no-user-group: Do not create a group with the same name as the user, but add the user to the group specified by the -g option or by the GROUP variable in /etc/default/useradd.
            if ((Flags & UserAddFlags.NoUserGroup) != 0)
            {
                yield return(preferLongNames == OptionPreference.Long ? "--no-user-group" : "-N");
            }
            // -o, --non-unique: Allow the creation of a user account with a duplicate (non-unique) UID.
            if ((Flags & UserAddFlags.NonUnique) != 0)
            {
                yield return(preferLongNames == OptionPreference.Long ? "--non-unique" : "-o");
            }
            // -r, --system: Create a system account.
            if ((Flags & UserAddFlags.System) != 0)
            {
                yield return(preferLongNames == OptionPreference.Long ? "--system" : "-r");
            }
            // -U, --user-group: Create a group with the same name as the user, and add the user to this group. The default behavior (if the -g, -N, and -U options are not specified) is defined by the USERGROUPS_ENAB variable in /etc/login.defs.
            if ((Flags & UserAddFlags.UserGroup) != 0)
            {
                yield return(preferLongNames == OptionPreference.Long ? "--user-group" : "-U");
            }
            // -b, --base-dir =BASE_DIR: BASE_DIR is concatenated with the account name to define the home directory.
            if (!string.IsNullOrEmpty(BaseDir))
            {
                yield return("--base-dir");

                yield return(BaseDir.ShellQuote());
            }
            // -c, --comment =COMMENT: Any text string.
            if (!string.IsNullOrEmpty(Comment))
            {
                yield return("--comment");

                yield return(Comment.ShellQuote());
            }
            // -d, --home =HOME_DIR: The new user will be created using HOME_DIR as the value for the user's login directory.
            if (!string.IsNullOrEmpty(Home))
            {
                yield return("--home");

                yield return(Home.ShellQuote());
            }
            // -g, --gid =GROUP: The group name or number of the user's initial login group. The group name must exist.
            if (!string.IsNullOrEmpty(Gid))
            {
                yield return("--gid");

                yield return(Gid.ShellQuote());
            }
            // -K, --key KEY=VALUE: Overrides /etc/login.defs defaults (UID_MIN, UID_MAX, UMASK, PASS_MAX_DAYS and others)
            foreach (var pair in Key)
            {
                yield return("--key");

                var value = pair.Value.ShellQuote();
                yield return($"{pair.Key}={value}");
            }
            // -p, --password =PASSWORD: The encrypted password, as returned by crypt(3). The default is to disable the password.
            if (!string.IsNullOrEmpty(Password))
            {
                yield return("--password");

                yield return(Password.ShellQuote());
            }
        }
Example #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Gid < 1)
                {
                    function.WriteErrMsg("参数出错");
                }
                M_CommonData mc = bc.SelReturnModel(Gid);
                if (mc == null || mc.IsNull)
                {
                    function.WriteErrMsg("[" + Gid + "]号文章不存在");
                }
                M_ModelInfo modelMod = bm.GetModelById(mc.ModelID);
                M_Node      nodeMod  = nodeBll.SelReturnModel(mc.NodeID);
                ModelID = mc.ModelID;
                NodeID  = mc.NodeID;
                if (modelMod.IsNull)
                {
                    function.WriteErrMsg("该内容所绑定的模型[" + mc.ModelID + "]不存在");
                }
                if (nodeMod.IsNull)
                {
                    function.WriteErrMsg("该内容所绑定的节点[" + mc.NodeID + "]不存在");
                }
                Call.SetBreadCrumb(Master, "<li><a href='ContentManage.aspx'>内容管理</a></li><li><a href='ContentManage.aspx?NodeID=" + mc.NodeID + "'>" + nodeMod.NodeName + "</a></li><li class='active'>预览" + modelMod.ItemName + "</li><div class='pull-right hidden-xs'><span><a href='" + customPath2 + "Content/SchedTask.aspx' title='查看计划任务'><span class='fa fa-clock-o' style='color:#28b462;'></span></a>" + GetOpenView() + "<span onclick=\"opentitle('EditNode.aspx?NodeID=" + mc.NodeID + "','配置本节点');\" class='fa fa-cog' title='配置本节点' style='cursor:pointer;margin-left:5px;'></span></span></div>");
                //--------------
                Button5.Text        = "修改" + modelMod.ItemName;
                Del_Btn.Text        = "删除" + modelMod.ItemName;
                Reject_Btn.Enabled  = (mc.Status != (int)ZLEnum.ConStatus.Reject);
                UnAudit_Btn.Enabled = (mc.Status == (int)ZLEnum.ConStatus.Audited);
                if (mc.EliteLevel == 1)
                {
                    Elite_Btn.Visible = false;
                    Button6.Visible   = true;
                }
                else
                {
                    Elite_Btn.Visible = true;
                    Button6.Visible   = false;
                }

                if (mc.Status == (int)ZLEnum.ConStatus.Recycle)
                {
                    Del_Btn.Enabled    = false;
                    Reject_Btn.Enabled = false;
                }
                else
                {
                    Del_Btn.Enabled = true;
                }
                NodeName_L.Text = nodeMod.NodeName;
                Gid_L.Text      = Gid.ToString();
                DataTable fieldDT = fieldBll.SelByModelID(mc.ModelID, true);
                //自定义字段名称
                C_Title_L.Text = B_Content.GetFieldAlias("Title", fieldDT) + ":";
                //
                Title_L.Text      = mc.Title;
                Inputer_L.Text    = mc.Inputer;
                Hits_L.Text       = mc.Hits.ToString();
                CreateTime_L.Text = mc.CreateTime.ToString();
                UpdateTime_L.Text = mc.UpDateTime.ToString();
                ConStatus_L.Text  = ZLEnum.GetConStatus(mc.Status);
                Elite_L.Text      = mc.EliteLevel == 1 ? "已推荐" : "未推荐";
                topimg_img.Src    = mc.TopImg;
                DataTable contentDT = bc.GetContentByItems(mc.TableName, mc.GeneralID);
                Base_L.Text = bfield.InputallHtml(ModelID, NodeID, new ModelConfig()
                {
                    ValueDT = contentDT,
                    Mode    = ModelConfig.SMode.PreView
                });
            }
        }
Example #20
0
 public override string ToString()
 {
     return(Gid.ToString());
 }