⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 print_sy.cs

📁 一个用vs2003编写的客户工资管理系统客户端程序/一个用vs2003编写的客户工资管理系统客户端程序
💻 CS
字号:
using System;
using System.Data;

using Jinrm.Data;

namespace GzglClient.BLL
{
	/// <summary>
	/// Print_SY 的摘要说明。
	/// </summary>
	public class Print_SY
	{
		#region 基本信息
		/// <summary>
		/// 姓名A
		/// </summary>
		public string name = "";
		/// <summary>
		/// 性别B
		/// </summary>
		public string sex="";
		/// <summary>
		/// 出身年月C
		/// </summary>
		public string birth="";
		/// <summary>
		/// 参加工作时间D
		/// </summary>
		public string cjgzsj="";
		/// <summary>
		/// 工作年限E
		/// </summary>
		public string gznx="";
		/// <summary>
		/// 现学历F
		/// </summary>
		public string xxl="";
		/// <summary>
		/// 学龄G
		/// </summary>
		public string xl="";
		/// <summary>
		/// 扣除工龄 93年以来不称职(不计等次)次数H
		/// </summary>
		public string kcgl="";
		/// <summary>
		/// 间断工龄A
		/// </summary>
		public string jdgl = "";
		/// <summary>
		/// 套改年限
		/// </summary>
		public string tgnx = "";
		#endregion

		#region 任职情况
		/// <summary>
		/// 工资类别I
		/// </summary>
		public string gzlb="";
		/// <summary>
		/// 岗位等级
		/// </summary>
		public string gwdj=""; 
		/// <summary>
		/// 任职时间(聘任时间)K
		/// </summary>
		public string rzsj="";
		/// <summary>
		/// 低一职任职时间L
		/// </summary>
		public string qrzsj="";
		#endregion

		#region 前工资情况
		/// <summary>
		/// 小计M
		/// </summary>
		public string qhj="0";
		/// <summary>
		/// 职务(等级)工资--档次
		/// </summary>
		public string qzwgzdc="";
		/// <summary>
		/// 职务(等级)工资
		/// </summary>
		public string qzwgz="0";
		/// <summary>
		/// 事业津贴(按30%计算)
		/// </summary>
		public string qsyjt="0";
		#endregion

		#region 现工资情况
		/// <summary>
		/// 小计S
		/// </summary>
		public string xhj="0";
		/// <summary>
		/// 岗位工资
		/// </summary>
		public string xgwgz="0";
		/// <summary>
		/// 薪级工资-薪级
		/// </summary>
		public string xxjgzxj="";
		/// <summary>
		/// 薪级工资-标准
		/// </summary>
		public string xxjgzbz="0";
		/// <summary>
		/// 月增资额X
		/// </summary>
		public string yzze="0";
		/// <summary>
		/// 备注Y
		/// </summary>
		public string bz="";
		#endregion

		public string sf = "";

		/// <summary>
		/// 审批时间
		/// </summary>
		public string spsj="";
		/// <summary>
		/// 审批人员
		/// </summary>
		public string spname="";

		/// <summary>
		/// 人员ID
		/// </summary>
		public string personid = "";
		private DoAccess conn = new DoAccess();

		/// <summary>
		/// 机关打印
		/// </summary>
		public Print_SY()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//
		}

		/// <summary>
		/// 获取属性
		/// </summary>
		/// <returns></returns>
		public bool GetProperty()
		{
			if(personid == "")
			{
				return false;
			}

			DataSet ds = conn.GetDs("*","V_TaoGai_Down","PersonId = '"+ personid +"' ","");
			if(ds.Tables[0].Rows.Count != 1)//判断是否是一条记录
			{
				return false;
			}

			#region 基本信息
			this.name = ds.Tables[0].Rows[0]["Name"].ToString();
			this.sex = ds.Tables[0].Rows[0]["Sex"].ToString();
			this.birth = ds.Tables[0].Rows[0]["Birth"].ToString();
			this.cjgzsj = ds.Tables[0].Rows[0]["Gzsj"].ToString();
			#region 工作年限
			int intgznx = 2006 - (Convert.ToDateTime(ds.Tables[0].Rows[0]["Gzsj"].ToString()).
				AddMonths(Convert.ToInt32(ds.Tables[0].Rows[0]["JDGL"].ToString()))).Year + 1;
			this.gznx = intgznx.ToString();
			#endregion
			this.xxl = ds.Tables[0].Rows[0]["XL"].ToString();
			this.xl = (Convert.ToInt32(ds.Tables[0].Rows[0]["YJXL"].ToString())/12).ToString();
			this.kcgl = ds.Tables[0].Rows[0]["KCGL"].ToString();
			#endregion

			this.jdgl = ds.Tables[0].Rows[0]["JDGL"].ToString();
			int inttgnx = Convert.ToDateTime("2006-07-01").Year + (Convert.ToInt32(ds.Tables[0].Rows[0]["YJXL"].ToString())/12) - 
				Convert.ToInt32(ds.Tables[0].Rows[0]["KCGL"].ToString()) - 
				(Convert.ToDateTime(ds.Tables[0].Rows[0]["Gzsj"].ToString()).AddMonths(Convert.ToInt32(ds.Tables[0].Rows[0]["JDGL"].ToString())).Year) + 1;
			tgnx = inttgnx.ToString();

			sf = ds.Tables[0].Rows[0]["SF"].ToString();

			#region 任职信息
			this.gzlb = sf;
			this.gwdj = ds.Tables[0].Rows[0]["ZWJB"].ToString();
			this.rzsj = ds.Tables[0].Rows[0]["ZDQGWRZSJ"].ToString();
			this.qrzsj = ds.Tables[0].Rows[0]["ZDQGWRZSJ_Q"].ToString();
			#endregion

			#region 前工资情况

			#region 职务工资
			if(ds.Tables[0].Rows[0]["SF"].ToString() != "新工作人员试用期")
			{
				string[] qzwgzdc = ds.Tables[0].Rows[0]["XZWGZDC"].ToString().Split('[');//助理级7档[532]  -  高级工6档[511元]
				if(qzwgzdc.Length == 2)
				{
					try
					{
						string[] qdcM = qzwgzdc[1].Split('元');
						Convert.ToInt32(qdcM[0]);
						this.qzwgz = qdcM[0];
					}
					catch
					{
						string[] qdcM = qzwgzdc[1].Split(']');
						this.qzwgz = qdcM[0];
					}

					string Qdc = qzwgzdc[0].Substring(qzwgzdc[0].Length - 3,2);
					try
					{
						Convert.ToInt32(Qdc);
					}
					catch
					{
						Qdc = qzwgzdc[0].Substring(qzwgzdc[0].Length - 2,1);
					}
					this.qzwgzdc = Qdc;
				}
				else
				{
					this.qzwgz = "0";
				}
			}
			else
			{
				this.qzwgz = "0";
			}
			#endregion

			#region 津贴
			this.qsyjt = MoneyConvertToYuan((Convert.ToDouble(qzwgz)*3/7).ToString());
			#endregion

			this.qhj = (Convert.ToDouble(this.qzwgz)+Convert.ToDouble(this.qsyjt)).ToString();
			#endregion

			#region 现工资情况
			if(ds.Tables[0].Rows[0]["GZ_ZWGZ"].ToString() != "")
			{
				this.xgwgz = ds.Tables[0].Rows[0]["GZ_ZWGZ"].ToString();
			}
			else
			{
				this.xgwgz = "0";
			}
			this.xxjgzxj = ds.Tables[0].Rows[0]["GZ_JB"].ToString();
			if(ds.Tables[0].Rows[0]["GZ_ZWGZ"].ToString() != "")
			{
				this.xxjgzbz = ds.Tables[0].Rows[0]["GZ_JBGZ"].ToString();
			}
			else
			{
				this.xxjgzbz = "0";
			}

			this.xhj = (Convert.ToDouble(xgwgz)+Convert.ToDouble(xxjgzbz)).ToString();
			if(qhj != "0")
			{
				this.yzze = (Convert.ToDouble(xhj)-Convert.ToDouble(qhj)).ToString();
			}
			else
			{
				this.yzze = "0";
			}
			this.bz = "";
			#endregion

			spsj = ds.Tables[0].Rows[0]["Is_TaoGai_Over_Time"].ToString();
			spname = ds.Tables[0].Rows[0]["UserId"].ToString();

			return true;
		}

		private string MoneyConvertToYuan(string _YMoney)
		{
			string _XMoney = "0";
			string[] _tempYMoney = _YMoney.Split('.');
			if(_tempYMoney.Length > 1)
			{
				if(Convert.ToDouble(_tempYMoney[1]) > 0 )
				{
					return (Convert.ToInt32(_tempYMoney[0]) + 1).ToString();
				}
				else
				{
					return _YMoney;
				}
			}
			else
			{
				return _YMoney;
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -