예제 #1
0
        public bool SaveMappingInformation(mdlACMapping obj_mdlMapping)
        {
            bool functionReturnValue = false;

            if (conn.State == ConnectionState.Open)
            {
                conn.Close();
            }
            conn.Open();
            try
            {
                SqlCommand cmd = new SqlCommand("stp_ERP_M_ACMapping_Insert", conn);
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Clear();
                cmd.Parameters.Add("@MappingID", SqlDbType.VarChar, 14).Value = obj_mdlMapping.pk_MappingID;
                cmd.Parameters.Add("@MappingName", SqlDbType.VarChar, 150).Value = obj_mdlMapping.MappingName;
                cmd.Parameters.Add("@ACCode", SqlDbType.VarChar, 50).Value = obj_mdlMapping.ACCode;
                cmd.Parameters.Add("@Remarks", SqlDbType.VarChar, 50).Value = obj_mdlMapping.Remarks;
                cmd.Parameters.Add("@AddUser", SqlDbType.VarChar, 50).Value = obj_mdlMapping.AddUser;
                cmd.Parameters.Add("@AddDate", SqlDbType.Date).Value = Convert.ToDateTime(obj_mdlMapping.AddDate);
                cmd.Parameters.Add("@AddTime", SqlDbType.VarChar, 50).Value = obj_mdlMapping.AddTime;
                if (cmd.ExecuteNonQuery() != 0)
                {
                    functionReturnValue = true;
                }
                else
                {
                    functionReturnValue = false;
                }
                cmd.Cancel();
                cmd.Dispose();
            }
            catch (Exception)
            {
                functionReturnValue = false;
            }
            return functionReturnValue;
        }
예제 #2
0
 public bool UpdateMappingInformation(mdlACMapping obj_mdlMapping)
 {
     return obj_dalACMapping.UpdateMappingInformation(obj_mdlMapping);
 }
예제 #3
0
 public bool SaveMappingInformation(mdlACMapping obj_mdlMapping)
 {
     return obj_dalACMapping.SaveMappingInformation(obj_mdlMapping);
 }